Niklas Haiden
538be47bc5
feat(item): add cost attribute and getter function
2026-05-08 16:43:55 +02:00
Berger Lena
f52ef23e6c
feat: item
...
- Add logic to spawn items at random intervals
- Add mechanic to collect items with 'E' key
- Refactor _random_position to a function
2026-05-08 16:23:02 +02:00
Berger Lena
c0a5c12d4e
feature: item
...
- add draw method to Item class with fallback colors
- fix ItemManager class name typo and missing self parameter in _random_position
- add draw and clear methods to ItemManager
- rename ITEM_SPAWN_INTERVAL to ITEM_SHOPPING_TIMER in is_expired
2026-05-08 16:03:42 +02:00
Berger Lena
2a6c93998b
refactor: create ItemManger class
...
- add itemManager class and moved randomPosition and update into it
- add is_expired to check if time ran out to buy spawned item
2026-05-08 15:47:29 +02:00
Berger Lena
3ca2ef1332
feature: item
...
- add Item base class with collision rect, spawn timer, and sprite loading
2026-05-08 15:25:06 +02:00
Berger Lena
32525ccdbb
feat: item
...
- Add function for finding a random item spawn position
2026-05-08 15:13:31 +02:00
Berger Lena
11ece2ee54
feat: item
...
- Create item.py
- Add update to remove expired items
- Add item settings for spawn interval, despawn timer, and size
2026-05-08 15:03:41 +02:00