summaryrefslogtreecommitdiff
path: root/Scenes/Entities/Enemies/Flower.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-05-01 09:41:02 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-05-01 09:41:02 +0200
commitd192b1546ab39180cdc28d2621c117539e3d26d6 (patch)
treebfe040b5fa56aab1cf1161aab4883ba6ca3510df /Scenes/Entities/Enemies/Flower.gd
parent81cc6f1d22677dd4a60aa9377c91b291bf10e523 (diff)
update
Diffstat (limited to 'Scenes/Entities/Enemies/Flower.gd')
-rw-r--r--Scenes/Entities/Enemies/Flower.gd22
1 files changed, 22 insertions, 0 deletions
diff --git a/Scenes/Entities/Enemies/Flower.gd b/Scenes/Entities/Enemies/Flower.gd
new file mode 100644
index 0000000..3e50e80
--- /dev/null
+++ b/Scenes/Entities/Enemies/Flower.gd
@@ -0,0 +1,22 @@
+extends CharacterBody2D
+
+
+var angle: float = 0
+
+
+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.died.connect(func():
+ $Body.remove_child($Body/Top)
+ )
+
+
+func shrink():
+ $Body/Top.play_backwards("default")
+
+func expand():
+ $Body/Top.play("default")