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.
This commit is contained in:
Dan 2024-05-15 14:47:28 +01:00
parent f0a7c5ca05
commit 7d47bdbf5a
3 changed files with 23 additions and 5 deletions

View file

@ -37,8 +37,10 @@ func get_random_target() -> Vector2:
return flowers.get_random_circumference_points()
func on_mouse_entered() -> void:
mouse_over = true
Log.pr("Mouse entered the snail!")
if eating:
mouse_over = true
CursorMgr.hand()
Log.pr("Mouse entered the snail!")
func on_mouse_exited() -> void:
# Reset the cursor to the default