From 84365b6f901a9c0251a9f724a8d9f81a3787e97d Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 3 Nov 2024 14:10:07 +0100 Subject: next commit --- Towers/Tower.tscn | 154 +++++++++++++++++++++++------------------------------- 1 file changed, 65 insertions(+), 89 deletions(-) (limited to 'Towers/Tower.tscn') diff --git a/Towers/Tower.tscn b/Towers/Tower.tscn index 792c41a..13bbe72 100644 --- a/Towers/Tower.tscn +++ b/Towers/Tower.tscn @@ -1,10 +1,59 @@ -[gd_scene load_steps=10 format=3 uid="uid://by1x56w21o165"] +[gd_scene load_steps=15 format=3 uid="uid://by1x56w21o165"] [ext_resource type="Script" path="res://Towers/Tower.gd" id="1_axo1d"] [ext_resource type="Texture2D" uid="uid://b1b18rd0tqbar" path="res://core_outdoor.png" id="1_mrep8"] [ext_resource type="PackedScene" uid="uid://cqktpc8c7ecn3" path="res://Game/Selection/SelectableArea.tscn" id="3_57d5u"] -[ext_resource type="Texture2D" uid="uid://ba3dmlce1wv2p" path="res://Towers/Components/Assets/frost-component.png" id="4_ccrqc"] -[ext_resource type="Texture2D" uid="uid://2djpswd6sgng" path="res://Towers/Components/Assets/burn-component.png" id="5_y7tf5"] +[ext_resource type="Texture2D" uid="uid://dujcs2ls3u6tj" path="res://Towers/Assets/spritesheet.png" id="3_brkps"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_1ubf7"] +atlas = ExtResource("3_brkps") +region = Rect2(0, 0, 70, 96) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5lmyn"] +atlas = ExtResource("3_brkps") +region = Rect2(70, 0, 70, 96) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rpcx3"] +atlas = ExtResource("3_brkps") +region = Rect2(140, 0, 70, 96) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ds0p3"] +atlas = ExtResource("3_brkps") +region = Rect2(210, 0, 70, 96) + +[sub_resource type="AtlasTexture" id="AtlasTexture_j7nj3"] +atlas = ExtResource("3_brkps") +region = Rect2(280, 0, 70, 96) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lklxx"] +atlas = ExtResource("3_brkps") +region = Rect2(350, 0, 70, 96) + +[sub_resource type="SpriteFrames" id="SpriteFrames_cd6hj"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_1ubf7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5lmyn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rpcx3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ds0p3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_j7nj3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lklxx") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] [sub_resource type="RectangleShape2D" id="RectangleShape2D_atm5x"] size = Vector2(31, 31) @@ -14,23 +63,6 @@ size = Vector2(31, 31) [sub_resource type="RectangleShape2D" id="RectangleShape2D_312i7"] size = Vector2(32, 32) -[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_spp26"] -properties/0/path = NodePath(".:position") -properties/0/spawn = true -properties/0/replication_mode = 0 -properties/1/path = NodePath(".:owner_id") -properties/1/spawn = true -properties/1/replication_mode = 0 -properties/2/path = NodePath(".:attack_range") -properties/2/spawn = true -properties/2/replication_mode = 2 -properties/3/path = NodePath("Sprite2D:modulate") -properties/3/spawn = true -properties/3/replication_mode = 0 -properties/4/path = NodePath("ComponentsAnchor:modulate") -properties/4/spawn = true -properties/4/replication_mode = 0 - [node name="Tower" type="StaticBody2D"] collision_layer = 4 collision_mask = 5 @@ -38,14 +70,22 @@ input_pickable = true script = ExtResource("1_axo1d") [node name="Sprite2D" type="Sprite2D" parent="."] +visible = false texture_filter = 1 -position = Vector2(0, -19) -scale = Vector2(1.0625, 1.0625) +position = Vector2(0, -11) texture = ExtResource("1_mrep8") centered = false region_enabled = true region_rect = Rect2(400, 439, 32, 41) +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +position = Vector2(0, -12) +scale = Vector2(0.457143, 0.457143) +sprite_frames = SubResource("SpriteFrames_cd6hj") +frame_progress = 0.499103 +centered = false + [node name="CollisionShape2D" type="CollisionShape2D" parent="."] position = Vector2(16, 16) shape = SubResource("RectangleShape2D_atm5x") @@ -71,67 +111,8 @@ shape = SubResource("RectangleShape2D_312i7") [node name="ComponentsAnchor" type="Marker2D" parent="."] position = Vector2(0, 32) -[node name="HUD" type="CanvasLayer" parent="."] -unique_name_in_owner = true - -[node name="VBoxContainer" type="VBoxContainer" parent="HUD"] -offset_left = 64.0 -offset_right = 140.0 -offset_bottom = 77.0 - -[node name="Data" type="Label" parent="HUD/VBoxContainer"] -unique_name_in_owner = true -layout_mode = 2 - -[node name="HBoxContainer" type="HBoxContainer" parent="HUD/VBoxContainer"] -layout_mode = 2 - -[node name="Button1" type="Button" parent="HUD/VBoxContainer/HBoxContainer"] -layout_mode = 2 -text = "+Range" - -[node name="Button2" type="Button" parent="HUD/VBoxContainer/HBoxContainer"] -layout_mode = 2 -text = "+Power" - -[node name="Button3" type="Button" parent="HUD/VBoxContainer/HBoxContainer"] -layout_mode = 2 -text = "+Speed" - -[node name="Components" type="VBoxContainer" parent="HUD/VBoxContainer"] -unique_name_in_owner = true -layout_mode = 2 - -[node name="Frost" type="HBoxContainer" parent="HUD/VBoxContainer/Components"] -layout_mode = 2 -mouse_default_cursor_shape = 2 - -[node name="TextureRect" type="TextureRect" parent="HUD/VBoxContainer/Components/Frost"] -custom_minimum_size = Vector2(32, 0) -layout_mode = 2 -texture = ExtResource("4_ccrqc") -stretch_mode = 5 - -[node name="Label" type="Label" parent="HUD/VBoxContainer/Components/Frost"] -layout_mode = 2 -text = "Frost" - -[node name="Burn" type="HBoxContainer" parent="HUD/VBoxContainer/Components"] -layout_mode = 2 -mouse_default_cursor_shape = 2 - -[node name="TextureRect" type="TextureRect" parent="HUD/VBoxContainer/Components/Burn"] -custom_minimum_size = Vector2(32, 0) -layout_mode = 2 -texture = ExtResource("5_y7tf5") -stretch_mode = 5 - -[node name="Label" type="Label" parent="HUD/VBoxContainer/Components/Burn"] -layout_mode = 2 -text = "Burn" - -[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."] -replication_config = SubResource("SceneReplicationConfig_spp26") +[node name="GroundAnchor" type="Marker2D" parent="."] +position = Vector2(16, 29) [connection signal="input_event" from="." to="." method="_on_input_event"] [connection signal="tree_exiting" from="." to="." method="_on_tree_exiting"] @@ -139,9 +120,4 @@ replication_config = SubResource("SceneReplicationConfig_spp26") [connection signal="body_exited" from="Range" to="." method="_on_range_body_exited"] [connection signal="hover_enter" from="SelectableArea" to="." method="_on_selectable_area_hover_enter"] [connection signal="hover_exit" from="SelectableArea" to="." method="_on_selectable_area_hover_exit"] -[connection signal="select" from="SelectableArea" to="." method="_on_selectable_area_select"] -[connection signal="pressed" from="HUD/VBoxContainer/HBoxContainer/Button1" to="." method="_on_button_1_pressed"] -[connection signal="pressed" from="HUD/VBoxContainer/HBoxContainer/Button2" to="." method="_on_button_2_pressed"] -[connection signal="pressed" from="HUD/VBoxContainer/HBoxContainer/Button3" to="." method="_on_button_3_pressed"] -[connection signal="gui_input" from="HUD/VBoxContainer/Components/Frost" to="." method="_on_h_box_container_gui_input"] -[connection signal="gui_input" from="HUD/VBoxContainer/Components/Burn" to="." method="_on_h_box_container_2_gui_input"] +[connection signal="select_primary" from="SelectableArea" to="." method="_on_selectable_area_select_primary"] -- cgit v1.2.3