Ajout d'animation de plante

This commit is contained in:
2024-09-01 19:46:39 +02:00
parent e7c469d0ae
commit ebcea9f687
2 changed files with 48 additions and 7 deletions

View File

@@ -76,6 +76,7 @@ func plant(new_position: Vector2):
state = PlantState.SAPLING
growing_timer.start(parameter.growing_time)
sprite_node.play("SAPLING")
$AnimationPlayer.play("Growing")
func grow():
@@ -102,6 +103,7 @@ func grow():
grown.emit()
sprite_node.play("GROWN")
$AnimationPlayer.play("Growing")
func die():
@@ -122,6 +124,7 @@ func die():
growing_timer.start(parameter.dead_time)
died.emit()
sprite_node.play("DEAD")
$AnimationPlayer.play("Growing")
func remove(was_dead: bool = true):
if was_dead: