Commit graph

5 commits

Author SHA1 Message Date
Dan
7f5d9dc6fc Updated snail entity behavior
The snail entity's default state has been changed from 'Move' to 'Sleep'. Visibility and color modulation of certain sprites have been adjusted. The initial state of the StateMachine node is now set to 'Sleeping' instead of 'Eating'. In the snail sleeping script, the sleep timer update and state transition are now conditional on whether the level has started.
2024-05-16 12:08:02 +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
7d47bdbf5a Enhanced snail interaction and sleep behavior
The update includes improvements to the snail's interactive behavior. Now, when the mouse hovers over a snail that is eating, it changes to a hand cursor. This change enhances user feedback during interaction.

Additionally, the sleeping state of the snail has been expanded. The snail now wakes up after a random interval between 15 and 25 seconds. A timer tracks this duration and triggers a state transition to "Eating" once elapsed.

A new hand cursor resource was also added to the CursorManager for use in these interactions.
2024-05-15 14:47:28 +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