summaryrefslogtreecommitdiff
path: root/Scenes/Entities/Enemies/Flower.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Scenes/Entities/Enemies/Flower.gd')
-rw-r--r--Scenes/Entities/Enemies/Flower.gd5
1 files changed, 5 insertions, 0 deletions
diff --git a/Scenes/Entities/Enemies/Flower.gd b/Scenes/Entities/Enemies/Flower.gd
index 3e50e80..d287bdc 100644
--- a/Scenes/Entities/Enemies/Flower.gd
+++ b/Scenes/Entities/Enemies/Flower.gd
@@ -8,8 +8,13 @@ func _ready():
$Body/Bottom.play("default")
add_to_group("enemies")
+
$Collision.init()
$Collision.collision_area.set_collision_layer_value(Utilities.Collision.Layer.ENEMY, true)
+
+ $Health.hit.connect(func():
+ $Body/Top.visible = false
+ )
$Health.died.connect(func():
$Body.remove_child($Body/Top)
)