From 1aac583cee47d232ef22d8c5df97b888f689ab96 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Wed, 9 Oct 2024 17:20:55 +0200 Subject: intermediate commit --- Towers/Assets/attack-component.png | Bin 191 -> 0 bytes Towers/Assets/attack-component.png.import | 34 ------ Towers/Assets/attack-component.png~ | Bin 206 -> 0 bytes Towers/Assets/burn-component.png | Bin 175 -> 0 bytes Towers/Assets/burn-component.png.import | 34 ------ Towers/Assets/burn-component.png~ | Bin 175 -> 0 bytes Towers/Assets/frost-component.png | Bin 176 -> 0 bytes Towers/Assets/frost-component.png.import | 34 ------ Towers/Assets/range-component.png | Bin 162 -> 0 bytes Towers/Assets/range-component.png.import | 34 ------ Towers/Assets/range-component.png~ | Bin 176 -> 0 bytes Towers/Components/Assets/attack-component.png | Bin 0 -> 191 bytes .../Components/Assets/attack-component.png.import | 34 ++++++ Towers/Components/Assets/attack-component.png~ | Bin 0 -> 206 bytes Towers/Components/Assets/burn-component.png | Bin 0 -> 175 bytes Towers/Components/Assets/burn-component.png.import | 34 ++++++ Towers/Components/Assets/burn-component.png~ | Bin 0 -> 175 bytes Towers/Components/Assets/frost-component.png | Bin 0 -> 176 bytes .../Components/Assets/frost-component.png.import | 34 ++++++ Towers/Components/Assets/range-component.png | Bin 0 -> 162 bytes .../Components/Assets/range-component.png.import | 34 ++++++ Towers/Components/Assets/range-component.png~ | Bin 0 -> 176 bytes Towers/Components/BurnComponent.gd | 11 ++ Towers/Components/FrostComponent.gd | 11 ++ Towers/Components/TowerComponent.gd | 15 +++ Towers/Tower.gd | 120 +++++++++++++++++++-- Towers/Tower.tscn | 70 +++++++++++- 27 files changed, 356 insertions(+), 143 deletions(-) delete mode 100644 Towers/Assets/attack-component.png delete mode 100644 Towers/Assets/attack-component.png.import delete mode 100644 Towers/Assets/attack-component.png~ delete mode 100644 Towers/Assets/burn-component.png delete mode 100644 Towers/Assets/burn-component.png.import delete mode 100644 Towers/Assets/burn-component.png~ delete mode 100644 Towers/Assets/frost-component.png delete mode 100644 Towers/Assets/frost-component.png.import delete mode 100644 Towers/Assets/range-component.png delete mode 100644 Towers/Assets/range-component.png.import delete mode 100644 Towers/Assets/range-component.png~ create mode 100644 Towers/Components/Assets/attack-component.png create mode 100644 Towers/Components/Assets/attack-component.png.import create mode 100644 Towers/Components/Assets/attack-component.png~ create mode 100644 Towers/Components/Assets/burn-component.png create mode 100644 Towers/Components/Assets/burn-component.png.import create mode 100644 Towers/Components/Assets/burn-component.png~ create mode 100644 Towers/Components/Assets/frost-component.png create mode 100644 Towers/Components/Assets/frost-component.png.import create mode 100644 Towers/Components/Assets/range-component.png create mode 100644 Towers/Components/Assets/range-component.png.import create mode 100644 Towers/Components/Assets/range-component.png~ create mode 100644 Towers/Components/BurnComponent.gd create mode 100644 Towers/Components/FrostComponent.gd create mode 100644 Towers/Components/TowerComponent.gd (limited to 'Towers') diff --git a/Towers/Assets/attack-component.png b/Towers/Assets/attack-component.png deleted file mode 100644 index bb9250c..0000000 Binary files a/Towers/Assets/attack-component.png and /dev/null differ diff --git a/Towers/Assets/attack-component.png.import b/Towers/Assets/attack-component.png.import deleted file mode 100644 index ef9a73b..0000000 --- a/Towers/Assets/attack-component.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://gbknvb38euuq" -path="res://.godot/imported/attack-component.png-648f34932bc6754ec1b1094b76b170bc.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://Towers/Assets/attack-component.png" -dest_files=["res://.godot/imported/attack-component.png-648f34932bc6754ec1b1094b76b170bc.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/Towers/Assets/attack-component.png~ b/Towers/Assets/attack-component.png~ deleted file mode 100644 index e2f80bc..0000000 Binary files a/Towers/Assets/attack-component.png~ and /dev/null differ diff --git a/Towers/Assets/burn-component.png b/Towers/Assets/burn-component.png deleted file mode 100644 index 33f9f7e..0000000 Binary files a/Towers/Assets/burn-component.png and /dev/null differ diff --git a/Towers/Assets/burn-component.png.import b/Towers/Assets/burn-component.png.import deleted file mode 100644 index 0783a55..0000000 --- a/Towers/Assets/burn-component.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://2djpswd6sgng" -path="res://.godot/imported/burn-component.png-c625b666f5c33be88ffb5514acf984cb.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://Towers/Assets/burn-component.png" -dest_files=["res://.godot/imported/burn-component.png-c625b666f5c33be88ffb5514acf984cb.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/Towers/Assets/burn-component.png~ b/Towers/Assets/burn-component.png~ deleted file mode 100644 index c9c1619..0000000 Binary files a/Towers/Assets/burn-component.png~ and /dev/null differ diff --git a/Towers/Assets/frost-component.png b/Towers/Assets/frost-component.png deleted file mode 100644 index e1c12f7..0000000 Binary files a/Towers/Assets/frost-component.png and /dev/null differ diff --git a/Towers/Assets/frost-component.png.import b/Towers/Assets/frost-component.png.import deleted file mode 100644 index d22126b..0000000 --- a/Towers/Assets/frost-component.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://ba3dmlce1wv2p" -path="res://.godot/imported/frost-component.png-e1bd3aee287cb92be940679bf3553e5f.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://Towers/Assets/frost-component.png" -dest_files=["res://.godot/imported/frost-component.png-e1bd3aee287cb92be940679bf3553e5f.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/Towers/Assets/range-component.png b/Towers/Assets/range-component.png deleted file mode 100644 index e5ef51e..0000000 Binary files a/Towers/Assets/range-component.png and /dev/null differ diff --git a/Towers/Assets/range-component.png.import b/Towers/Assets/range-component.png.import deleted file mode 100644 index c626726..0000000 --- a/Towers/Assets/range-component.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dx07y4scyi5a1" -path="res://.godot/imported/range-component.png-5b23d157d3796cb80d7b2edb7addabe5.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://Towers/Assets/range-component.png" -dest_files=["res://.godot/imported/range-component.png-5b23d157d3796cb80d7b2edb7addabe5.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/Towers/Assets/range-component.png~ b/Towers/Assets/range-component.png~ deleted file mode 100644 index e1c12f7..0000000 Binary files a/Towers/Assets/range-component.png~ and /dev/null differ diff --git a/Towers/Components/Assets/attack-component.png b/Towers/Components/Assets/attack-component.png new file mode 100644 index 0000000..bb9250c Binary files /dev/null and b/Towers/Components/Assets/attack-component.png differ diff --git a/Towers/Components/Assets/attack-component.png.import b/Towers/Components/Assets/attack-component.png.import new file mode 100644 index 0000000..4000c58 --- /dev/null +++ b/Towers/Components/Assets/attack-component.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://gbknvb38euuq" +path="res://.godot/imported/attack-component.png-64ebd1f55ef8067c9f5d485d7df578be.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Towers/Components/Assets/attack-component.png" +dest_files=["res://.godot/imported/attack-component.png-64ebd1f55ef8067c9f5d485d7df578be.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Towers/Components/Assets/attack-component.png~ b/Towers/Components/Assets/attack-component.png~ new file mode 100644 index 0000000..e2f80bc Binary files /dev/null and b/Towers/Components/Assets/attack-component.png~ differ diff --git a/Towers/Components/Assets/burn-component.png b/Towers/Components/Assets/burn-component.png new file mode 100644 index 0000000..33f9f7e Binary files /dev/null and b/Towers/Components/Assets/burn-component.png differ diff --git a/Towers/Components/Assets/burn-component.png.import b/Towers/Components/Assets/burn-component.png.import new file mode 100644 index 0000000..433699a --- /dev/null +++ b/Towers/Components/Assets/burn-component.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://2djpswd6sgng" +path="res://.godot/imported/burn-component.png-de3b76cc035d6d043dda7fb037e0c7e4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Towers/Components/Assets/burn-component.png" +dest_files=["res://.godot/imported/burn-component.png-de3b76cc035d6d043dda7fb037e0c7e4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Towers/Components/Assets/burn-component.png~ b/Towers/Components/Assets/burn-component.png~ new file mode 100644 index 0000000..c9c1619 Binary files /dev/null and b/Towers/Components/Assets/burn-component.png~ differ diff --git a/Towers/Components/Assets/frost-component.png b/Towers/Components/Assets/frost-component.png new file mode 100644 index 0000000..e1c12f7 Binary files /dev/null and b/Towers/Components/Assets/frost-component.png differ diff --git a/Towers/Components/Assets/frost-component.png.import b/Towers/Components/Assets/frost-component.png.import new file mode 100644 index 0000000..9ebc0d6 --- /dev/null +++ b/Towers/Components/Assets/frost-component.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ba3dmlce1wv2p" +path="res://.godot/imported/frost-component.png-09974dabb6d634a6ff1c953d1b9c629b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Towers/Components/Assets/frost-component.png" +dest_files=["res://.godot/imported/frost-component.png-09974dabb6d634a6ff1c953d1b9c629b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Towers/Components/Assets/range-component.png b/Towers/Components/Assets/range-component.png new file mode 100644 index 0000000..e5ef51e Binary files /dev/null and b/Towers/Components/Assets/range-component.png differ diff --git a/Towers/Components/Assets/range-component.png.import b/Towers/Components/Assets/range-component.png.import new file mode 100644 index 0000000..9500e69 --- /dev/null +++ b/Towers/Components/Assets/range-component.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dx07y4scyi5a1" +path="res://.godot/imported/range-component.png-e61b3503df71027fb6ac2a7fbd9e5943.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Towers/Components/Assets/range-component.png" +dest_files=["res://.godot/imported/range-component.png-e61b3503df71027fb6ac2a7fbd9e5943.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Towers/Components/Assets/range-component.png~ b/Towers/Components/Assets/range-component.png~ new file mode 100644 index 0000000..e1c12f7 Binary files /dev/null and b/Towers/Components/Assets/range-component.png~ differ diff --git a/Towers/Components/BurnComponent.gd b/Towers/Components/BurnComponent.gd new file mode 100644 index 0000000..11e9e3f --- /dev/null +++ b/Towers/Components/BurnComponent.gd @@ -0,0 +1,11 @@ +extends TowerComponent + + +func _init() -> void: + name = "Burn" + set_sprite(preload("res://Towers/Components/Assets/burn-component.png")) + + +func on_shoot(target: Unit): + var effect = preload("res://Effects/BurnEffect.tscn").instantiate() + target.add_effect(effect) diff --git a/Towers/Components/FrostComponent.gd b/Towers/Components/FrostComponent.gd new file mode 100644 index 0000000..d6384a7 --- /dev/null +++ b/Towers/Components/FrostComponent.gd @@ -0,0 +1,11 @@ +extends TowerComponent + + +func _init() -> void: + name = "Frost" + set_sprite(preload("res://Towers/Components/Assets/frost-component.png")) + + +func on_shoot(target: Unit): + var effect = preload("res://Effects/SlowEffect.tscn").instantiate() + target.add_effect(effect) diff --git a/Towers/Components/TowerComponent.gd b/Towers/Components/TowerComponent.gd new file mode 100644 index 0000000..570b442 --- /dev/null +++ b/Towers/Components/TowerComponent.gd @@ -0,0 +1,15 @@ +class_name TowerComponent +extends Resource + + +var name: String +var sprite: Sprite2D = Sprite2D.new() + + +func set_sprite(texture: Texture2D): + sprite.texture = texture + + sprite.texture_filter = CanvasItem.TEXTURE_FILTER_NEAREST + sprite.centered = false + sprite.scale = Vector2(2, 2) + sprite.name = name diff --git a/Towers/Tower.gd b/Towers/Tower.gd index 54687fd..4262af1 100644 --- a/Towers/Tower.gd +++ b/Towers/Tower.gd @@ -6,6 +6,7 @@ signal selected signal deselected static var selected_towers: Array[Tower] +static var hovered_tower: Tower var is_selected = false : set(value): @@ -16,12 +17,19 @@ var is_selected = false : else: Tower.selected_towers.erase(self) deselected.emit() - Client.stage.hud.tower.text = "" is_selected = value queue_redraw() + toggle_ui() var is_hovered = false : set(value): + if value: + hovered_tower = self + Input.set_default_cursor_shape(Input.CURSOR_POINTING_HAND) + else: + if hovered_tower == self: + hovered_tower = null + Input.set_default_cursor_shape(Input.CURSOR_ARROW) is_hovered = value queue_redraw() @@ -30,16 +38,26 @@ var mobs_in_range: Array = [] #var selection_area: Area2D # rpc owner id -var owner_id = 1 +@export var owner_id = 1 @export var attack_range: int = 32 @export var attack_power: int = 1 @export var attack_speed: int = 1 +@export var components: Array[TowerComponent] = [] + func _ready(): $Range/CollisionShape2D.shape.radius = attack_range $ShootCooldown.wait_time = attack_speed + + toggle_ui() + + #for component in [ + #preload("res://Towers/Components/FrostComponent.gd").new(), + #preload("res://Towers/Components/BurnComponent.gd").new(), + #]: + #add_component(component) func _draw(): @@ -122,26 +140,50 @@ func _on_selectable_area_select(event: InputEvent) -> void: +func add_component(component: TowerComponent): + components.append(component) + var sprite = component.sprite + $ComponentsAnchor.add_child(sprite) + redraw_components() + +func remove_component(component_name: String): + for component in components: + if component.name == component_name: + components.erase(component) + $ComponentsAnchor.remove_child($ComponentsAnchor.get_node(NodePath(component.name))) + break + redraw_components() + +func redraw_components(): + for idx in range(components.size()): + var component = components[idx] + var sprite = $ComponentsAnchor.get_node(NodePath(component.name)) + sprite.position.y = (idx + 1) * -16 + + func is_melee_range(): return attack_range <= (Client.stage.map.tile_set.tile_size.x * 2) func shoot(): - if get_multiplayer_authority() != multiplayer.get_unique_id(): + if not multiplayer.is_server(): # TODO: do shoot animation, but don't subtract hp return var target = mobs_in_range[0] as Unit + for component in components: + if component.has_method("on_shoot"): + component.on_shoot(target) + if is_melee_range(): target.set_hp(target.hp - 1) else: # TODO target.set_hp(target.hp - 1) -func show_ui(): - # todo: show ui - pass +func toggle_ui(): + $HUD.visible = is_selected func get_region(): @@ -163,4 +205,70 @@ func get_rpc_properties() -> Dictionary: "name": null, "global_position": null, "owner_id": null, + "attack_range": null, } + + +func _on_h_box_container_gui_input(event: InputEvent) -> void: + if event.is_action_pressed("select"): + get_viewport().set_input_as_handled() + + for tower in selected_towers: + var found = false + for idx in range(tower.components.size()): + var component = tower.components[idx] + if component.name == "Frost": + found = true + tower.remove_component(component.name) + break + + if not found: + tower.add_component(preload("res://Towers/Components/FrostComponent.gd").new()) + + var data = {"components": []} + for c in tower.components: + data["components"].append(c.name) + Client.update_tower(tower, data) + + +func _on_h_box_container_2_gui_input(event: InputEvent) -> void: + if event.is_action_pressed("select"): + get_viewport().set_input_as_handled() + + for tower in selected_towers: + var found = false + for idx in range(tower.components.size()): + var component = tower.components[idx] + if component.name == "Burn": + found = true + tower.remove_component(component.name) + break + + if not found: + tower.add_component(preload("res://Towers/Components/BurnComponent.gd").new()) + + var data = {"components": []} + for c in tower.components: + data["components"].append(c.name) + Client.update_tower(tower, data) + + +class NetworkData extends Resource: + var name: String + var position: Vector2 + +func to_network_data() -> NetworkData: + var data = NetworkData.new() + + data.name = name + data.position = global_position + + return data + +static func from_network_data(data: NetworkData) -> Tower: + var tower: Tower = preload("res://Towers/Tower.tscn").instantiate() + + tower.name = data.name + tower.global_position = data.position + + return tower diff --git a/Towers/Tower.tscn b/Towers/Tower.tscn index 4177a3a..6bff2e3 100644 --- a/Towers/Tower.tscn +++ b/Towers/Tower.tscn @@ -1,8 +1,10 @@ -[gd_scene load_steps=7 format=3 uid="uid://by1x56w21o165"] +[gd_scene load_steps=10 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"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_atm5x"] size = Vector2(31, 31) @@ -12,6 +14,23 @@ 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"] y_sort_enabled = true collision_layer = 4 @@ -48,6 +67,53 @@ one_shot = true position = Vector2(16, 16) shape = SubResource("RectangleShape2D_312i7") +[node name="ComponentsAnchor" type="Marker2D" parent="."] +position = Vector2(0, 32) + +[node name="HUD" type="CanvasLayer" parent="."] + +[node name="CenterContainer" type="CenterContainer" parent="HUD"] +anchors_preset = 12 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 0 + +[node name="VBoxContainer" type="VBoxContainer" parent="HUD/CenterContainer"] +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="HUD/CenterContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 + +[node name="TextureRect" type="TextureRect" parent="HUD/CenterContainer/VBoxContainer/HBoxContainer"] +custom_minimum_size = Vector2(32, 0) +layout_mode = 2 +texture = ExtResource("4_ccrqc") +stretch_mode = 5 + +[node name="Label" type="Label" parent="HUD/CenterContainer/VBoxContainer/HBoxContainer"] +layout_mode = 2 +text = "Frost" + +[node name="HBoxContainer2" type="HBoxContainer" parent="HUD/CenterContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 + +[node name="TextureRect" type="TextureRect" parent="HUD/CenterContainer/VBoxContainer/HBoxContainer2"] +custom_minimum_size = Vector2(32, 0) +layout_mode = 2 +texture = ExtResource("5_y7tf5") +stretch_mode = 5 + +[node name="Label" type="Label" parent="HUD/CenterContainer/VBoxContainer/HBoxContainer2"] +layout_mode = 2 +text = "Burn" + +[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."] +replication_config = SubResource("SceneReplicationConfig_spp26") + [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"] @@ -57,3 +123,5 @@ shape = SubResource("RectangleShape2D_312i7") [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="gui_input" from="HUD/CenterContainer/VBoxContainer/HBoxContainer" to="." method="_on_h_box_container_gui_input"] +[connection signal="gui_input" from="HUD/CenterContainer/VBoxContainer/HBoxContainer2" to="." method="_on_h_box_container_2_gui_input"] -- cgit v1.2.3