Commit graph

6 commits

Author SHA1 Message Date
Dan
84f07fde20 Updated entity interaction and game state
Significant changes include:
- Disabled input pickability for DeathBox in Dog entity
- Simplified mouse click detection logic in Snail script
- Removed unnecessary conditions and actions from snail eating state
- Adjusted cursor hotspot position for hand cursor in Cursor Manager
- Reset flower nectar level upon game reset
2024-05-16 12:33:24 +01:00
Dan
b8f42a552e Enhanced snail animations and interactions
Added new animation states for the snail entity, including 'Move' and 'Sleep'. The snail now hides certain elements when eating and plays appropriate animations when transitioning between states. Also introduced a new texture for sleep indication.
2024-05-16 12:00:52 +01:00
Dan
5777a7f2f1 Enhanced snail entity with new features
Added a sprite to the Snail class and implemented animations for the snail's movements. The snail now has a body and shell texture, along with an eating shadow. Also, added logic to flip the sprite based on movement direction in the 'snail_eating' state. Furthermore, made CollisionShape2D invisible for better aesthetics.
2024-05-15 17:21:47 +01:00
Dan
f0a7c5ca05 Added health bar and snail behavior enhancements
- Introduced a health bar for flowers, which updates based on the current GameState values.
- Enhanced snail behavior with eating and sleeping states. Snails now have a chance to switch to the sleeping state while eating.
- Improved mouse interaction with snails, allowing them to potentially switch to sleep mode when clicked.
- Refactored cursor management into its own class for better code organization and readability.
- Updated drone placement logic to use the new CursorManager class.
- Added functionality for bees to replenish flower nectar levels after a certain number of deposits.
2024-05-15 13:57:31 +01:00
Dan
2a9e78b52e Refactor: Added explicit typing and void return types
- Introduced explicit typing to variables and functions across multiple scripts for better code clarity.
- Specified 'void' as the return type for functions that do not return a value.
- Removed redundant code in some scripts.
2024-05-15 10:42:16 +01:00
Dan
908f834181 Update flower entity to spawn snails based on game state.
- Added Snail entity with states for eating and sleeping.
- Modified Flowers script to handle snail spawning logic.
2024-05-14 14:51:01 +01:00