aboutsummaryrefslogtreecommitdiffstats
path: root/godot/scenes/objects
diff options
context:
space:
mode:
authorLibravatar cel <cel@blos.sm>2022-07-17 02:56:58 +0100
committerLibravatar cel <cel@blos.sm>2022-07-17 02:56:58 +0100
commit5d5d662a99a512e2718aae4a4a84f050bc1d411f (patch)
treee0c4dde0528ac8318f0775c3dac511e609a72826 /godot/scenes/objects
parent45c8787154fe7384c9c1faa2ab7c003b995393ca (diff)
parent16f5d5aaacdd1a1420bba8d6600942520d85cb8c (diff)
download2022-5d5d662a99a512e2718aae4a4a84f050bc1d411f.tar.gz
2022-5d5d662a99a512e2718aae4a4a84f050bc1d411f.tar.bz2
2022-5d5d662a99a512e2718aae4a4a84f050bc1d411f.zip
merged
Diffstat (limited to '')
-rw-r--r--godot/scenes/objects/GoalTriggerBox.gd (renamed from godot/scripts/GoalTriggerBox.gd)2
-rw-r--r--godot/scenes/objects/GoalZone.tscn13
2 files changed, 14 insertions, 1 deletions
diff --git a/godot/scripts/GoalTriggerBox.gd b/godot/scenes/objects/GoalTriggerBox.gd
index 6e1034b..9659520 100644
--- a/godot/scripts/GoalTriggerBox.gd
+++ b/godot/scenes/objects/GoalTriggerBox.gd
@@ -13,7 +13,7 @@ func _ready():
# pass
-func _on_Area2_body_entered(body: RigidBody):
+func _on_Area_body_entered(body: RigidBody):
# return when body is not a rigidbody
if body == null:
return
diff --git a/godot/scenes/objects/GoalZone.tscn b/godot/scenes/objects/GoalZone.tscn
new file mode 100644
index 0000000..79b8624
--- /dev/null
+++ b/godot/scenes/objects/GoalZone.tscn
@@ -0,0 +1,13 @@
+[gd_scene load_steps=3 format=2]
+
+[ext_resource path="res://scenes/objects/GoalTriggerBox.gd" type="Script" id=1]
+
+[sub_resource type="BoxShape" id=1]
+
+[node name="GoalZone" type="Area"]
+script = ExtResource( 1 )
+
+[node name="CollisionShape" type="CollisionShape" parent="."]
+shape = SubResource( 1 )
+
+[connection signal="body_entered" from="." to="." method="_on_Area_body_entered"]