summaryrefslogtreecommitdiff
path: root/Stages/Goal/goal.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Stages/Goal/goal.gd')
-rw-r--r--Stages/Goal/goal.gd10
1 files changed, 10 insertions, 0 deletions
diff --git a/Stages/Goal/goal.gd b/Stages/Goal/goal.gd
new file mode 100644
index 0000000..6854d7a
--- /dev/null
+++ b/Stages/Goal/goal.gd
@@ -0,0 +1,10 @@
+extends Node2D
+
+
+func _ready() -> void:
+ $AnimatedSprite2D.play("default")
+
+
+func _on_area_2d_body_entered(body: Node2D) -> void:
+ if body is Unit:
+ body.enter_goal($GoalCenter.global_position)