Ajout d'animation de plante
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user