ajout des graines procédurales et des cinamatiques
This commit is contained in:
@@ -21,6 +21,8 @@ const SPRITE_SCENE : PackedScene = preload("res://entities/plants/plant_sprite.t
|
||||
@onready var collision_shape: CollisionShape2D
|
||||
@onready var influence_zone : PlantInfluenceZone
|
||||
|
||||
var harvested = false
|
||||
|
||||
func _init(
|
||||
_data : PlantData
|
||||
):
|
||||
@@ -31,7 +33,7 @@ func _ready():
|
||||
collision_shape = generate_collision_shape()
|
||||
influence_zone = generate_influence_zone()
|
||||
|
||||
plant_sprite.update_plant_sprite(data, false)
|
||||
plant_sprite.setup_plant_sprite(data)
|
||||
|
||||
func pointer_text() -> String:
|
||||
return data.plant_name
|
||||
@@ -103,6 +105,8 @@ func harvest():
|
||||
for m in data.mutations:
|
||||
m._start_harvested_effect(self)
|
||||
|
||||
harvested = true
|
||||
|
||||
plant_sprite.start_harvest_animation()
|
||||
await plant_sprite.harvest_animation_finished
|
||||
disappear()
|
||||
|
||||
Reference in New Issue
Block a user