#20 #26 ajout d'une autre plante et de la mécanique de récolte, avec plusieurs graines possibles

This commit is contained in:
2025-08-20 09:31:40 +02:00
parent 1f301815be
commit 9de869b7af
20 changed files with 414 additions and 42 deletions

View File

@@ -0,0 +1,17 @@
extends Node2D
class_name PlantSprite
signal harvest_animation_finished
@onready var sprite = $Sprite2D
func apply_texture_to_sprite(texture, with_animation = true):
if with_animation:
$AnimationPlayer.play("bump")
await $AnimationPlayer.animation_finished
sprite.texture = texture
func start_harvest_animation():
$AnimationPlayer.play("harvest")
await $AnimationPlayer.animation_finished
harvest_animation_finished.emit()