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.
This commit is contained in:
Dan 2024-05-15 17:21:47 +01:00
parent 7d47bdbf5a
commit 5777a7f2f1
9 changed files with 213 additions and 4 deletions

View file

@ -3,6 +3,7 @@ class_name Snail
@onready var fsm : FiniteStateMachine = $StateMachine as FiniteStateMachine
@onready var flowers : Flowers = get_parent()
@onready var sprite : Sprite2D = $Sprite
var enabled : bool = false
var eating : bool = false