From 8d4e709f7e2390e06c3e412c20662e8bc21f0d0c Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Tue, 20 Aug 2024 17:00:49 +0200 Subject: initial commit --- Tower.tscn | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Tower.tscn (limited to 'Tower.tscn') diff --git a/Tower.tscn b/Tower.tscn new file mode 100644 index 0000000..310e438 --- /dev/null +++ b/Tower.tscn @@ -0,0 +1,43 @@ +[gd_scene load_steps=5 format=3 uid="uid://by1x56w21o165"] + +[ext_resource type="Script" path="res://Tower.gd" id="1_axo1d"] +[ext_resource type="Texture2D" uid="uid://b1b18rd0tqbar" path="res://core_outdoor.png" id="1_mrep8"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_atm5x"] +size = Vector2(15, 15) + +[sub_resource type="CircleShape2D" id="CircleShape2D_qa8kt"] + +[node name="Tower" type="StaticBody2D"] +y_sort_enabled = true +collision_layer = 4 +collision_mask = 5 +input_pickable = true +script = ExtResource("1_axo1d") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture_filter = 1 +position = Vector2(0, -8) +scale = Vector2(0.625, 0.625) +texture = ExtResource("1_mrep8") +region_enabled = true +region_rect = Rect2(400, 432, 32, 48) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_atm5x") + +[node name="Range" type="Area2D" parent="."] +collision_layer = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Range"] +shape = SubResource("CircleShape2D_qa8kt") + +[node name="ShootCooldown" type="Timer" parent="."] +one_shot = true + +[connection signal="input_event" from="." to="." method="_on_input_event"] +[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"] +[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"] +[connection signal="tree_exiting" from="." to="." method="_on_tree_exiting"] +[connection signal="body_entered" from="Range" to="." method="_on_range_body_entered"] +[connection signal="body_exited" from="Range" to="." method="_on_range_body_exited"] -- cgit v1.2.3