diff options
author | Daniel Weipert <code@drogueronin.de> | 2020-12-31 11:33:12 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2020-12-31 11:33:12 +0100 |
commit | fb64f15e22acfc1c03c7c5357dd66077454adbcf (patch) | |
tree | 96cdbb8f59bd65609aa76276dfba94f9cdad33d4 /Objects |
Initial commit
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/Flag.gd | 6 | ||||
-rw-r--r-- | Objects/Flag.tscn | 19 |
2 files changed, 25 insertions, 0 deletions
diff --git a/Objects/Flag.gd b/Objects/Flag.gd new file mode 100644 index 0000000..bdb2237 --- /dev/null +++ b/Objects/Flag.gd @@ -0,0 +1,6 @@ +extends Area2D + + +func _on_Flag_body_entered(body): + body.check_flag() + get_parent().end_level() diff --git a/Objects/Flag.tscn b/Objects/Flag.tscn new file mode 100644 index 0000000..0cc1c35 --- /dev/null +++ b/Objects/Flag.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://icon.png" type="Texture" id=1] +[ext_resource path="res://Objects/Flag.gd" type="Script" id=2] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 64.2993, 64.1957 ) + +[node name="Flag" type="Area2D"] +script = ExtResource( 2 ) + +[node name="Sprite" type="Sprite" parent="."] +scale = Vector2( 0.25, 0.25 ) +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +scale = Vector2( 0.25, 0.25 ) +shape = SubResource( 1 ) +[connection signal="body_entered" from="." to="." method="_on_Flag_body_entered"] |