diff --git a/DungeonShooting_Godot/prefab/ui/MapEditor.tscn b/DungeonShooting_Godot/prefab/ui/MapEditor.tscn index 945a117..a324d75 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditor.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditor.tscn @@ -57,6 +57,9 @@ [node name="Draw" type="Node2D" parent="Bg/HSplitContainer/Left/MapView/SubViewport/TileMap"] z_index = 100 +[node name="CanvasLayer" type="CanvasLayer" parent="Bg/HSplitContainer/Left/MapView/SubViewport"] +layer = 2 + [node name="Right" type="Panel" parent="Bg/HSplitContainer"] custom_minimum_size = Vector2(300, 0) layout_mode = 2 diff --git a/DungeonShooting_Godot/prefab/ui/MapEditorTools.tscn b/DungeonShooting_Godot/prefab/ui/MapEditorTools.tscn new file mode 100644 index 0000000..e85f8cc --- /dev/null +++ b/DungeonShooting_Godot/prefab/ui/MapEditorTools.tscn @@ -0,0 +1,49 @@ +[gd_scene load_steps=3 format=3 uid="uid://b4u66mxndxbrg"] + +[ext_resource type="Script" path="res://src/game/ui/mapEditorTools/MapEditorToolsPanel.cs" id="1_mqp1c"] +[ext_resource type="Texture2D" uid="uid://uhhfgdhpk7i4" path="res://icon.png" id="2_rwvbg"] + +[node name="MapEditorTools" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_mqp1c") + +[node name="HBoxContainer" type="HBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 1 +anchor_left = 1.0 +anchor_right = 1.0 +offset_left = -288.0 +offset_top = 19.0 +offset_right = -20.0 +offset_bottom = 83.0 +grow_horizontal = 0 +mouse_filter = 0 + +[node name="TextureButton" type="TextureButton" parent="HBoxContainer"] +layout_mode = 2 +texture_normal = ExtResource("2_rwvbg") +texture_pressed = ExtResource("2_rwvbg") +texture_hover = ExtResource("2_rwvbg") + +[node name="TextureButton2" type="TextureButton" parent="HBoxContainer"] +layout_mode = 2 +texture_normal = ExtResource("2_rwvbg") +texture_pressed = ExtResource("2_rwvbg") +texture_hover = ExtResource("2_rwvbg") + +[node name="TextureButton3" type="TextureButton" parent="HBoxContainer"] +layout_mode = 2 +texture_normal = ExtResource("2_rwvbg") +texture_pressed = ExtResource("2_rwvbg") +texture_hover = ExtResource("2_rwvbg") + +[node name="TextureButton4" type="TextureButton" parent="HBoxContainer"] +layout_mode = 2 +texture_normal = ExtResource("2_rwvbg") +texture_pressed = ExtResource("2_rwvbg") +texture_hover = ExtResource("2_rwvbg") diff --git a/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001.png.import b/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001.png.import index b20c9a6..c36be94 100644 --- a/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001.png.import +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://chd2vtesap5cf" -path="res://.godot/imported/enemy0001.png-1247a3ddf8a1a163d812cad12c4340fd.ctex" +path="res://.godot/imported/Enemy0001.png-148a38dfa95953b26d890356e8875de4.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/sprite/role/enemy0001/enemy0001.png" -dest_files=["res://.godot/imported/enemy0001.png-1247a3ddf8a1a163d812cad12c4340fd.ctex"] +source_file="res://resource/sprite/role/enemy0001/Enemy0001.png" +dest_files=["res://.godot/imported/Enemy0001.png-148a38dfa95953b26d890356e8875de4.ctex"] [params] diff --git a/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001_Debris.png.import b/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001_Debris.png.import index 56388a2..d563acf 100644 --- a/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001_Debris.png.import +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001_Debris.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://d2f55lu60x64i" -path="res://.godot/imported/enemy0001_Debris.png-297a2fb6680cb862a9a085cf58f8268c.ctex" +path="res://.godot/imported/Enemy0001_Debris.png-ac416dc79cd3c1217b27e1ef1fbe0d0b.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/sprite/role/enemy0001/enemy0001_Debris.png" -dest_files=["res://.godot/imported/enemy0001_Debris.png-297a2fb6680cb862a9a085cf58f8268c.ctex"] +source_file="res://resource/sprite/role/enemy0001/Enemy0001_Debris.png" +dest_files=["res://.godot/imported/Enemy0001_Debris.png-ac416dc79cd3c1217b27e1ef1fbe0d0b.ctex"] [params] diff --git a/DungeonShooting_Godot/resource/theme/mainTheme.tres b/DungeonShooting_Godot/resource/theme/mainTheme.tres index 0627eb5..3cf5a71 100644 --- a/DungeonShooting_Godot/resource/theme/mainTheme.tres +++ b/DungeonShooting_Godot/resource/theme/mainTheme.tres @@ -352,7 +352,7 @@ [sub_resource type="ImageTexture" id="58"] -[sub_resource type="Image" id="Image_2ril5"] +[sub_resource type="Image" id="Image_2evuq"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -362,7 +362,7 @@ } [sub_resource type="ImageTexture" id="60"] -image = SubResource("Image_2ril5") +image = SubResource("Image_2evuq") [sub_resource type="StyleBoxTexture" id="61"] content_margin_left = 2.0 @@ -372,7 +372,7 @@ texture = SubResource("60") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_05i4u"] +[sub_resource type="Image" id="Image_rgwcq"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -382,7 +382,7 @@ } [sub_resource type="ImageTexture" id="63"] -image = SubResource("Image_05i4u") +image = SubResource("Image_rgwcq") [sub_resource type="StyleBoxTexture" id="64"] content_margin_left = 2.0 @@ -392,7 +392,7 @@ texture = SubResource("63") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_xvqdk"] +[sub_resource type="Image" id="Image_rsy3d"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -402,7 +402,7 @@ } [sub_resource type="ImageTexture" id="66"] -image = SubResource("Image_xvqdk") +image = SubResource("Image_rsy3d") [sub_resource type="StyleBoxTexture" id="67"] content_margin_left = 2.0 @@ -412,7 +412,7 @@ texture = SubResource("66") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_306kn"] +[sub_resource type="Image" id="Image_flfsw"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -422,7 +422,7 @@ } [sub_resource type="ImageTexture" id="69"] -image = SubResource("Image_306kn") +image = SubResource("Image_flfsw") [sub_resource type="StyleBoxTexture" id="70"] content_margin_left = 0.0 @@ -446,7 +446,7 @@ content_margin_right = 4.0 content_margin_bottom = 4.0 -[sub_resource type="Image" id="Image_7wlgg"] +[sub_resource type="Image" id="Image_5lwa8"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 228, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 228, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 18, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 17, 255, 255, 255, 186, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 191, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 186, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 189, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 77, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 77, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -456,7 +456,7 @@ } [sub_resource type="ImageTexture" id="56"] -image = SubResource("Image_7wlgg") +image = SubResource("Image_5lwa8") [sub_resource type="StyleBoxFlat" id="57"] content_margin_left = 6.0 diff --git a/DungeonShooting_Godot/src/framework/generator/UiGenerator.cs b/DungeonShooting_Godot/src/framework/generator/UiGenerator.cs index 46889c6..10f5671 100644 --- a/DungeonShooting_Godot/src/framework/generator/UiGenerator.cs +++ b/DungeonShooting_Godot/src/framework/generator/UiGenerator.cs @@ -179,11 +179,11 @@ return retraction + $"/// \n" + retraction + $"/// 类型: , 路径: {parent}{uiNodeInfo.OriginName}\n" + retraction + $"/// \n" + - retraction + $"public class {uiNodeInfo.ClassName} : IUiNode<{uiNodeInfo.NodeTypeName}, {uiNodeInfo.ClassName}>\n" + + retraction + $"public class {uiNodeInfo.ClassName} : UiNode<{uiNodeInfo.UiRootName}, {uiNodeInfo.NodeTypeName}, {uiNodeInfo.ClassName}>\n" + retraction + $"{{\n" + GeneratePropertyListClassCode("Instance.", parent, uiNodeInfo, retraction + " ") + - retraction + $" public {uiNodeInfo.ClassName}({uiNodeInfo.NodeTypeName} node) : base(node) {{ }}\n" + - retraction + $" public override {uiNodeInfo.ClassName} Clone() => new (({uiNodeInfo.NodeTypeName})Instance.Duplicate());\n" + + retraction + $" public {uiNodeInfo.ClassName}({uiNodeInfo.UiRootName} uiPanel, {uiNodeInfo.NodeTypeName} node) : base(uiPanel, node) {{ }}\n" + + retraction + $" public override {uiNodeInfo.ClassName} Clone() => new (UiPanel, ({uiNodeInfo.NodeTypeName})Instance.Duplicate());\n" + retraction + $"}}\n\n"; } @@ -204,6 +204,15 @@ private static string GeneratePropertyCode(string target, string parent, UiNodeInfo uiNodeInfo, string retraction) { + string uiPanel; + if (string.IsNullOrEmpty(target)) + { + uiPanel = "this"; + } + else + { + uiPanel = "UiPanel"; + } return retraction + $"/// \n" + retraction + $"/// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: {parent}{uiNodeInfo.OriginName}\n" + retraction + $"/// \n" + @@ -211,7 +220,7 @@ retraction + $"{{\n" + retraction + $" get\n" + retraction + $" {{\n" + - retraction + $" if (_{uiNodeInfo.Name} == null) _{uiNodeInfo.Name} = new {uiNodeInfo.ClassName}({target}GetNodeOrNull<{uiNodeInfo.NodeTypeName}>(\"{uiNodeInfo.OriginName}\"));\n" + + retraction + $" if (_{uiNodeInfo.Name} == null) _{uiNodeInfo.Name} = new {uiNodeInfo.ClassName}({uiPanel}, {target}GetNodeOrNull<{uiNodeInfo.NodeTypeName}>(\"{uiNodeInfo.OriginName}\"));\n" + retraction + $" return _{uiNodeInfo.Name};\n" + retraction + $" }}\n" + retraction + $"}}\n" + diff --git a/DungeonShooting_Godot/src/framework/ui/IUiNode.cs b/DungeonShooting_Godot/src/framework/ui/IUiNode.cs deleted file mode 100644 index 7e20a13..0000000 --- a/DungeonShooting_Godot/src/framework/ui/IUiNode.cs +++ /dev/null @@ -1,47 +0,0 @@ - -using Godot; - -/// -/// Ui节点代码接口 -/// -/// Godot中的节点类型 -/// 克隆该对象返回的类型 -public abstract class IUiNode : IClone where TNodeType : Node -{ - /// - /// Godot节点实例 - /// - public TNodeType Instance { get; } - /// - /// 克隆当前对象, 并返回新的对象, - /// 注意: 如果子节点改名或者移动层级, 那么有可能对导致属性中的子节点无法访问 - /// - public abstract TCloneType Clone(); - - public IUiNode(TNodeType node) - { - Instance = node; - } - - /// - /// 嵌套打开子ui - /// - public UiBase OpenNestedUi(string uiName) - { - var packedScene = ResourceManager.Load("res://" + GameConfig.UiPrefabDir + uiName + ".tscn"); - var uiBase = packedScene.Instantiate(); - Instance.AddChild(uiBase); - - uiBase.OnCreateUi(); - uiBase.ShowUi(); - return uiBase; - } - - /// - /// 嵌套打开子ui - /// - public T OpenNestedUi(string uiName) where T : UiBase - { - return (T)OpenNestedUi(uiName); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/ui/UiBase.cs b/DungeonShooting_Godot/src/framework/ui/UiBase.cs index 01bc2a8..15115e6 100644 --- a/DungeonShooting_Godot/src/framework/ui/UiBase.cs +++ b/DungeonShooting_Godot/src/framework/ui/UiBase.cs @@ -44,7 +44,11 @@ //开启的协程 private List _coroutineList; - + //嵌套打开的Ui列表 + private HashSet _nestedUiSet; + //所属父级Ui, UiNode.RecordNestedUi() 嵌套打开的 Ui 将被赋予此值 + private UiBase _targetUi; + public UiBase(string uiName) { UiName = uiName; @@ -96,6 +100,15 @@ IsOpen = true; Visible = true; OnShowUi(); + + //子Ui调用显示 + if (_nestedUiSet != null) + { + foreach (var uiBase in _nestedUiSet) + { + uiBase.ShowUi(); + } + } } /// @@ -111,6 +124,15 @@ IsOpen = false; Visible = false; OnHideUi(); + + //子Ui调用隐藏 + if (_nestedUiSet != null) + { + foreach (var uiBase in _nestedUiSet) + { + uiBase.HideUi(); + } + } } /// @@ -127,6 +149,16 @@ HideUi(); IsDisposed = true; OnDisposeUi(); + + //子Ui调用销毁 + if (_nestedUiSet != null) + { + foreach (var uiBase in _nestedUiSet) + { + uiBase.DisposeUi(); + } + } + QueueFree(); } @@ -143,6 +175,46 @@ } /// + /// 记录嵌套打开/关闭的UI + /// + public void RecordNestedUi(UiBase uiBase, UiManager.RecordType type) + { + if (type == UiManager.RecordType.Open) + { + if (uiBase._targetUi != null && uiBase._targetUi != this) + { + GD.PrintErr($"子Ui:'{uiBase.UiName}'已经被其他Ui:'{uiBase._targetUi.UiName}'嵌套打开!"); + uiBase._targetUi.RecordNestedUi(uiBase, UiManager.RecordType.Close); + } + if (_nestedUiSet == null) + { + _nestedUiSet = new HashSet(); + } + + uiBase._targetUi = this; + _nestedUiSet.Add(uiBase); + } + else + { + if (uiBase._targetUi == this) + { + uiBase._targetUi = null; + } + else + { + GD.PrintErr($"当前Ui:'{UiName}'没有嵌套打开子Ui:'{uiBase.UiName}'!"); + return; + } + + if (_nestedUiSet == null) + { + return; + } + _nestedUiSet.Remove(uiBase); + } + } + + /// /// 开启一个协程, 返回协程 id, 协程是在普通帧执行的, 支持: 协程嵌套, WaitForSeconds, WaitForFixedProcess, Task, SignalAwaiter /// public long StartCoroutine(IEnumerator able) diff --git a/DungeonShooting_Godot/src/framework/ui/UiNode.cs b/DungeonShooting_Godot/src/framework/ui/UiNode.cs new file mode 100644 index 0000000..bfa30e2 --- /dev/null +++ b/DungeonShooting_Godot/src/framework/ui/UiNode.cs @@ -0,0 +1,75 @@ + +using Godot; + +/// +/// Ui节点父类, 无泛型无属性 +/// +public abstract class UiNode +{ +} + +/// +/// Ui节点父类 +/// +/// 所属Ui面板类型 +/// Godot中的节点类型 +/// 克隆该对象返回的类型 +public abstract class UiNode + : UiNode, IUiCellNode, IClone + where TUi : UiBase + where TNodeType : Node + where TCloneType : IUiCellNode +{ + /// + /// 当前Ui节点所属的Ui面板对象 + /// + public TUi UiPanel { get; } + /// + /// Godot节点实例 + /// + public TNodeType Instance { get; } + /// + /// 克隆当前对象, 并返回新的对象, + /// 注意: 如果子节点改名或者移动层级, 那么有可能对导致属性中的子节点无法访问 + /// + public abstract TCloneType Clone(); + + public UiNode(TUi uiPanel, TNodeType node) + { + UiPanel = uiPanel; + Instance = node; + } + + /// + /// 嵌套打开子ui + /// + public UiBase OpenNestedUi(string uiName) + { + var packedScene = ResourceManager.Load("res://" + GameConfig.UiPrefabDir + uiName + ".tscn"); + var uiBase = packedScene.Instantiate(); + Instance.AddChild(uiBase); + UiPanel.RecordNestedUi(uiBase, UiManager.RecordType.Open); + + uiBase.OnCreateUi(); + uiBase.ShowUi(); + return uiBase; + } + + /// + /// 嵌套打开子ui + /// + public T OpenNestedUi(string uiName) where T : UiBase + { + return (T)OpenNestedUi(uiName); + } + + public Node GetUiInstance() + { + return Instance; + } + + public IUiCellNode CloneUiCell() + { + return Clone(); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/ui/grid/IUiCellNode.cs b/DungeonShooting_Godot/src/framework/ui/grid/IUiCellNode.cs new file mode 100644 index 0000000..20e16e7 --- /dev/null +++ b/DungeonShooting_Godot/src/framework/ui/grid/IUiCellNode.cs @@ -0,0 +1,18 @@ + +using Godot; + +/// +/// 用于网格中的cell对象 +/// +public interface IUiCellNode +{ + /// + /// 获取节点实例 + /// + Node GetUiInstance(); + + /// + /// 克隆并返回新的节点实例 + /// + IUiCellNode CloneUiCell(); +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/ui/grid/UiCell.cs b/DungeonShooting_Godot/src/framework/ui/grid/UiCell.cs index 2870ffa..f3de805 100644 --- a/DungeonShooting_Godot/src/framework/ui/grid/UiCell.cs +++ b/DungeonShooting_Godot/src/framework/ui/grid/UiCell.cs @@ -1,12 +1,12 @@  using Godot; -public abstract class UiCell : IDestroy where TNodeType : Node where TUiNodeType : IUiNode +public abstract class UiCell : IDestroy where TUiCellNode : IUiCellNode { public bool IsDestroyed { get; private set; } - public UiGrid Grid { get; set; } - public TUiNodeType CellNode { get; set; } + public UiGrid Grid { get; set; } + public TUiCellNode CellNode { get; set; } public T Data { get; set; } public virtual void OnInit() diff --git a/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs b/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs index 925b4e2..d1398af 100644 --- a/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs +++ b/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs @@ -10,21 +10,22 @@ /// 原生Godot类型 /// Ui节点类型 /// 传给Cell的数据类型 -public partial class UiGrid : GridContainer, IDestroy where TNodeType : Node where TUiNodeType : IUiNode +public partial class UiGrid : GridContainer, IDestroy where TUiCellNode : IUiCellNode { public bool IsDestroyed { get; private set; } - private TUiNodeType _template; + private TUiCellNode _template; private Node _parent; private Type _cellType; - private Stack> _cellPool = new Stack>(); - private List> _cellList = new List>(); + private Stack> _cellPool = new Stack>(); + private List> _cellList = new List>(); - public UiGrid(TUiNodeType template, Type cellType, int columns, int offsetX, int offsetY) + public UiGrid(TUiCellNode template, Type cellType, int columns, int offsetX, int offsetY) { _template = template; _cellType = cellType; - _parent = _template.Instance.GetParent(); - _parent.RemoveChild(_template.Instance); + var uiInstance = _template.GetUiInstance(); + _parent = uiInstance.GetParent(); + _parent.RemoveChild(uiInstance); _parent.AddChild(this); Columns = columns; AddThemeConstantOverride("h_separation", offsetX); @@ -33,7 +34,7 @@ public override void _Ready() { - if (_template.Instance is Control control) + if (_template.GetUiInstance() is Control control) { Position = control.Position; } @@ -47,7 +48,7 @@ { var cell = GetCellInstance(); _cellList.Add(cell); - AddChild(cell.CellNode.Instance); + AddChild(cell.CellNode.GetUiInstance()); } while (array.Length > _cellList.Count); } else if(array.Length < _cellList.Count) @@ -71,7 +72,7 @@ { var cell = GetCellInstance(); _cellList.Add(cell); - AddChild(cell.CellNode.Instance); + AddChild(cell.CellNode.GetUiInstance()); cell.OnSetData(data); } @@ -96,27 +97,27 @@ _cellPool = null; } - private UiCell GetCellInstance() + private UiCell GetCellInstance() { if (_cellPool.Count > 0) { return _cellPool.Pop(); } - var uiCell = Activator.CreateInstance(_cellType) as UiCell; + var uiCell = Activator.CreateInstance(_cellType) as UiCell; if (uiCell is null) { - throw new Exception($"cellType 无法转为'{typeof(UiCell).FullName}'类型!"); + throw new Exception($"cellType 无法转为'{typeof(UiCell).FullName}'类型!"); } - uiCell.CellNode = _template.Clone(); + uiCell.CellNode = (TUiCellNode)_template.CloneUiCell(); uiCell.Grid = this; uiCell.OnInit(); return uiCell; } - private void ReclaimCellInstance(UiCell cell) + private void ReclaimCellInstance(UiCell cell) { - RemoveChild(cell.CellNode.Instance); + RemoveChild(cell.CellNode.GetUiInstance()); _cellPool.Push(cell); } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index f0c3b89..13f88aa 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -52,6 +52,7 @@ public const string prefab_ui_Loading_tscn = "res://prefab/ui/Loading.tscn"; public const string prefab_ui_Main_tscn = "res://prefab/ui/Main.tscn"; public const string prefab_ui_MapEditor_tscn = "res://prefab/ui/MapEditor.tscn"; + public const string prefab_ui_MapEditorTools_tscn = "res://prefab/ui/MapEditorTools.tscn"; public const string prefab_ui_RoomUI_tscn = "res://prefab/ui/RoomUI.tscn"; public const string prefab_ui_Settlement_tscn = "res://prefab/ui/Settlement.tscn"; public const string prefab_weapon_Weapon0001_tscn = "res://prefab/weapon/Weapon0001.tscn"; diff --git a/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs b/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs index 2a86882..f67ed67 100644 --- a/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs +++ b/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs @@ -11,6 +11,7 @@ public const string Loading = "Loading"; public const string Main = "Main"; public const string MapEditor = "MapEditor"; + public const string MapEditorTools = "MapEditorTools"; public const string RoomUI = "RoomUI"; public const string Settlement = "Settlement"; } @@ -216,6 +217,46 @@ } /// + /// 打开 MapEditorTools, 并返回UI实例 + /// + public static UI.MapEditorTools.MapEditorToolsPanel Open_MapEditorTools() + { + return OpenUi(UiName.MapEditorTools); + } + + /// + /// 隐藏 MapEditorTools 的所有实例 + /// + public static void Hide_MapEditorTools() + { + var uiInstance = Get_MapEditorTools_Instance(); + foreach (var uiPanel in uiInstance) + { + uiPanel.HideUi(); + } + } + + /// + /// 销毁 MapEditorTools 的所有实例 + /// + public static void Dispose_MapEditorTools() + { + var uiInstance = Get_MapEditorTools_Instance(); + foreach (var uiPanel in uiInstance) + { + uiPanel.DisposeUi(); + } + } + + /// + /// 获取所有 MapEditorTools 的实例, 如果没有实例, 则返回一个空数组 + /// + public static UI.MapEditorTools.MapEditorToolsPanel[] Get_MapEditorTools_Instance() + { + return GetUiInstance(nameof(UI.MapEditorTools.MapEditorTools)); + } + + /// /// 打开 RoomUI, 并返回UI实例 /// public static UI.RoomUI.RoomUIPanel Open_RoomUI() diff --git a/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTips.cs b/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTips.cs index c345195..5900940 100644 --- a/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTips.cs +++ b/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTips.cs @@ -12,7 +12,7 @@ { get { - if (_L_Panel == null) _L_Panel = new BottomTips_Panel(GetNodeOrNull("Panel")); + if (_L_Panel == null) _L_Panel = new BottomTips_Panel(this, GetNodeOrNull("Panel")); return _L_Panel; } } @@ -26,16 +26,16 @@ /// /// 类型: , 路径: BottomTips.Panel.MarginContainer.CenterContainer.HBoxContainer.AspectRatioContainer.TextureRect /// - public class BottomTips_TextureRect : IUiNode + public class BottomTips_TextureRect : UiNode { - public BottomTips_TextureRect(Godot.TextureRect node) : base(node) { } - public override BottomTips_TextureRect Clone() => new ((Godot.TextureRect)Instance.Duplicate()); + public BottomTips_TextureRect(BottomTips uiPanel, Godot.TextureRect node) : base(uiPanel, node) { } + public override BottomTips_TextureRect Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate()); } /// /// 类型: , 路径: BottomTips.Panel.MarginContainer.CenterContainer.HBoxContainer.AspectRatioContainer /// - public class BottomTips_AspectRatioContainer : IUiNode + public class BottomTips_AspectRatioContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: BottomTips.Panel.MarginContainer.CenterContainer.HBoxContainer.TextureRect @@ -44,29 +44,29 @@ { get { - if (_L_TextureRect == null) _L_TextureRect = new BottomTips_TextureRect(Instance.GetNodeOrNull("TextureRect")); + if (_L_TextureRect == null) _L_TextureRect = new BottomTips_TextureRect(UiPanel, Instance.GetNodeOrNull("TextureRect")); return _L_TextureRect; } } private BottomTips_TextureRect _L_TextureRect; - public BottomTips_AspectRatioContainer(Godot.AspectRatioContainer node) : base(node) { } - public override BottomTips_AspectRatioContainer Clone() => new ((Godot.AspectRatioContainer)Instance.Duplicate()); + public BottomTips_AspectRatioContainer(BottomTips uiPanel, Godot.AspectRatioContainer node) : base(uiPanel, node) { } + public override BottomTips_AspectRatioContainer Clone() => new (UiPanel, (Godot.AspectRatioContainer)Instance.Duplicate()); } /// /// 类型: , 路径: BottomTips.Panel.MarginContainer.CenterContainer.HBoxContainer.Label /// - public class BottomTips_Label : IUiNode + public class BottomTips_Label : UiNode { - public BottomTips_Label(Godot.Label node) : base(node) { } - public override BottomTips_Label Clone() => new ((Godot.Label)Instance.Duplicate()); + public BottomTips_Label(BottomTips uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override BottomTips_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: BottomTips.Panel.MarginContainer.CenterContainer.HBoxContainer /// - public class BottomTips_HBoxContainer : IUiNode + public class BottomTips_HBoxContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: BottomTips.Panel.MarginContainer.CenterContainer.AspectRatioContainer @@ -75,7 +75,7 @@ { get { - if (_L_AspectRatioContainer == null) _L_AspectRatioContainer = new BottomTips_AspectRatioContainer(Instance.GetNodeOrNull("AspectRatioContainer")); + if (_L_AspectRatioContainer == null) _L_AspectRatioContainer = new BottomTips_AspectRatioContainer(UiPanel, Instance.GetNodeOrNull("AspectRatioContainer")); return _L_AspectRatioContainer; } } @@ -88,20 +88,20 @@ { get { - if (_L_Label == null) _L_Label = new BottomTips_Label(Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new BottomTips_Label(UiPanel, Instance.GetNodeOrNull("Label")); return _L_Label; } } private BottomTips_Label _L_Label; - public BottomTips_HBoxContainer(Godot.HBoxContainer node) : base(node) { } - public override BottomTips_HBoxContainer Clone() => new ((Godot.HBoxContainer)Instance.Duplicate()); + public BottomTips_HBoxContainer(BottomTips uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override BottomTips_HBoxContainer Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: BottomTips.Panel.MarginContainer.CenterContainer /// - public class BottomTips_CenterContainer : IUiNode + public class BottomTips_CenterContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: BottomTips.Panel.MarginContainer.HBoxContainer @@ -110,20 +110,20 @@ { get { - if (_L_HBoxContainer == null) _L_HBoxContainer = new BottomTips_HBoxContainer(Instance.GetNodeOrNull("HBoxContainer")); + if (_L_HBoxContainer == null) _L_HBoxContainer = new BottomTips_HBoxContainer(UiPanel, Instance.GetNodeOrNull("HBoxContainer")); return _L_HBoxContainer; } } private BottomTips_HBoxContainer _L_HBoxContainer; - public BottomTips_CenterContainer(Godot.CenterContainer node) : base(node) { } - public override BottomTips_CenterContainer Clone() => new ((Godot.CenterContainer)Instance.Duplicate()); + public BottomTips_CenterContainer(BottomTips uiPanel, Godot.CenterContainer node) : base(uiPanel, node) { } + public override BottomTips_CenterContainer Clone() => new (UiPanel, (Godot.CenterContainer)Instance.Duplicate()); } /// /// 类型: , 路径: BottomTips.Panel.MarginContainer /// - public class BottomTips_MarginContainer : IUiNode + public class BottomTips_MarginContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: BottomTips.Panel.CenterContainer @@ -132,20 +132,20 @@ { get { - if (_L_CenterContainer == null) _L_CenterContainer = new BottomTips_CenterContainer(Instance.GetNodeOrNull("CenterContainer")); + if (_L_CenterContainer == null) _L_CenterContainer = new BottomTips_CenterContainer(UiPanel, Instance.GetNodeOrNull("CenterContainer")); return _L_CenterContainer; } } private BottomTips_CenterContainer _L_CenterContainer; - public BottomTips_MarginContainer(Godot.MarginContainer node) : base(node) { } - public override BottomTips_MarginContainer Clone() => new ((Godot.MarginContainer)Instance.Duplicate()); + public BottomTips_MarginContainer(BottomTips uiPanel, Godot.MarginContainer node) : base(uiPanel, node) { } + public override BottomTips_MarginContainer Clone() => new (UiPanel, (Godot.MarginContainer)Instance.Duplicate()); } /// /// 类型: , 路径: BottomTips.Panel /// - public class BottomTips_Panel : IUiNode + public class BottomTips_Panel : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: BottomTips.MarginContainer @@ -154,14 +154,14 @@ { get { - if (_L_MarginContainer == null) _L_MarginContainer = new BottomTips_MarginContainer(Instance.GetNodeOrNull("MarginContainer")); + if (_L_MarginContainer == null) _L_MarginContainer = new BottomTips_MarginContainer(UiPanel, Instance.GetNodeOrNull("MarginContainer")); return _L_MarginContainer; } } private BottomTips_MarginContainer _L_MarginContainer; - public BottomTips_Panel(Godot.PanelContainer node) : base(node) { } - public override BottomTips_Panel Clone() => new ((Godot.PanelContainer)Instance.Duplicate()); + public BottomTips_Panel(BottomTips uiPanel, Godot.PanelContainer node) : base(uiPanel, node) { } + public override BottomTips_Panel Clone() => new (UiPanel, (Godot.PanelContainer)Instance.Duplicate()); } diff --git a/DungeonShooting_Godot/src/game/ui/editorTools/EditorTools.cs b/DungeonShooting_Godot/src/game/ui/editorTools/EditorTools.cs index c385304..d925d03 100644 --- a/DungeonShooting_Godot/src/game/ui/editorTools/EditorTools.cs +++ b/DungeonShooting_Godot/src/game/ui/editorTools/EditorTools.cs @@ -12,7 +12,7 @@ { get { - if (_L_ScrollContainer == null) _L_ScrollContainer = new EditorTools_ScrollContainer(GetNodeOrNull("ScrollContainer")); + if (_L_ScrollContainer == null) _L_ScrollContainer = new EditorTools_ScrollContainer(this, GetNodeOrNull("ScrollContainer")); return _L_ScrollContainer; } } @@ -25,7 +25,7 @@ { get { - if (_L_Confirm == null) _L_Confirm = new EditorTools_Confirm(GetNodeOrNull("Confirm")); + if (_L_Confirm == null) _L_Confirm = new EditorTools_Confirm(this, GetNodeOrNull("Confirm")); return _L_Confirm; } } @@ -38,7 +38,7 @@ { get { - if (_L_Tips == null) _L_Tips = new EditorTools_Tips(GetNodeOrNull("Tips")); + if (_L_Tips == null) _L_Tips = new EditorTools_Tips(this, GetNodeOrNull("Tips")); return _L_Tips; } } @@ -52,25 +52,25 @@ /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer.Label /// - public class EditorTools_Label : IUiNode + public class EditorTools_Label : UiNode { - public EditorTools_Label(Godot.Label node) : base(node) { } - public override EditorTools_Label Clone() => new ((Godot.Label)Instance.Duplicate()); + public EditorTools_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override EditorTools_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer.Button /// - public class EditorTools_Button : IUiNode + public class EditorTools_Button : UiNode { - public EditorTools_Button(Godot.Button node) : base(node) { } - public override EditorTools_Button Clone() => new ((Godot.Button)Instance.Duplicate()); + public EditorTools_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override EditorTools_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer /// - public class EditorTools_HBoxContainer : IUiNode + public class EditorTools_HBoxContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label @@ -79,7 +79,7 @@ { get { - if (_L_Label == null) _L_Label = new EditorTools_Label(Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new EditorTools_Label(UiPanel, Instance.GetNodeOrNull("Label")); return _L_Label; } } @@ -92,47 +92,47 @@ { get { - if (_L_Button == null) _L_Button = new EditorTools_Button(Instance.GetNodeOrNull("Button")); + if (_L_Button == null) _L_Button = new EditorTools_Button(UiPanel, Instance.GetNodeOrNull("Button")); return _L_Button; } } private EditorTools_Button _L_Button; - public EditorTools_HBoxContainer(Godot.HBoxContainer node) : base(node) { } - public override EditorTools_HBoxContainer Clone() => new ((Godot.HBoxContainer)Instance.Duplicate()); + public EditorTools_HBoxContainer(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override EditorTools_HBoxContainer Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer3.Label /// - public class EditorTools1_Label : IUiNode + public class EditorTools1_Label : UiNode { - public EditorTools1_Label(Godot.Label node) : base(node) { } - public override EditorTools1_Label Clone() => new ((Godot.Label)Instance.Duplicate()); + public EditorTools1_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override EditorTools1_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer3.LineEdit /// - public class EditorTools_LineEdit : IUiNode + public class EditorTools_LineEdit : UiNode { - public EditorTools_LineEdit(Godot.LineEdit node) : base(node) { } - public override EditorTools_LineEdit Clone() => new ((Godot.LineEdit)Instance.Duplicate()); + public EditorTools_LineEdit(EditorTools uiPanel, Godot.LineEdit node) : base(uiPanel, node) { } + public override EditorTools_LineEdit Clone() => new (UiPanel, (Godot.LineEdit)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer3.Button /// - public class EditorTools1_Button : IUiNode + public class EditorTools1_Button : UiNode { - public EditorTools1_Button(Godot.Button node) : base(node) { } - public override EditorTools1_Button Clone() => new ((Godot.Button)Instance.Duplicate()); + public EditorTools1_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override EditorTools1_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer3 /// - public class EditorTools_HBoxContainer3 : IUiNode + public class EditorTools_HBoxContainer3 : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label @@ -141,7 +141,7 @@ { get { - if (_L_Label == null) _L_Label = new EditorTools1_Label(Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new EditorTools1_Label(UiPanel, Instance.GetNodeOrNull("Label")); return _L_Label; } } @@ -154,7 +154,7 @@ { get { - if (_L_LineEdit == null) _L_LineEdit = new EditorTools_LineEdit(Instance.GetNodeOrNull("LineEdit")); + if (_L_LineEdit == null) _L_LineEdit = new EditorTools_LineEdit(UiPanel, Instance.GetNodeOrNull("LineEdit")); return _L_LineEdit; } } @@ -167,38 +167,38 @@ { get { - if (_L_Button == null) _L_Button = new EditorTools1_Button(Instance.GetNodeOrNull("Button")); + if (_L_Button == null) _L_Button = new EditorTools1_Button(UiPanel, Instance.GetNodeOrNull("Button")); return _L_Button; } } private EditorTools1_Button _L_Button; - public EditorTools_HBoxContainer3(Godot.HBoxContainer node) : base(node) { } - public override EditorTools_HBoxContainer3 Clone() => new ((Godot.HBoxContainer)Instance.Duplicate()); + public EditorTools_HBoxContainer3(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override EditorTools_HBoxContainer3 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer4.Label /// - public class EditorTools2_Label : IUiNode + public class EditorTools2_Label : UiNode { - public EditorTools2_Label(Godot.Label node) : base(node) { } - public override EditorTools2_Label Clone() => new ((Godot.Label)Instance.Duplicate()); + public EditorTools2_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override EditorTools2_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer4.Button /// - public class EditorTools2_Button : IUiNode + public class EditorTools2_Button : UiNode { - public EditorTools2_Button(Godot.Button node) : base(node) { } - public override EditorTools2_Button Clone() => new ((Godot.Button)Instance.Duplicate()); + public EditorTools2_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override EditorTools2_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer4 /// - public class EditorTools_HBoxContainer4 : IUiNode + public class EditorTools_HBoxContainer4 : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label @@ -207,7 +207,7 @@ { get { - if (_L_Label == null) _L_Label = new EditorTools2_Label(Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new EditorTools2_Label(UiPanel, Instance.GetNodeOrNull("Label")); return _L_Label; } } @@ -220,38 +220,38 @@ { get { - if (_L_Button == null) _L_Button = new EditorTools2_Button(Instance.GetNodeOrNull("Button")); + if (_L_Button == null) _L_Button = new EditorTools2_Button(UiPanel, Instance.GetNodeOrNull("Button")); return _L_Button; } } private EditorTools2_Button _L_Button; - public EditorTools_HBoxContainer4(Godot.HBoxContainer node) : base(node) { } - public override EditorTools_HBoxContainer4 Clone() => new ((Godot.HBoxContainer)Instance.Duplicate()); + public EditorTools_HBoxContainer4(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override EditorTools_HBoxContainer4 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer5.Label /// - public class EditorTools3_Label : IUiNode + public class EditorTools3_Label : UiNode { - public EditorTools3_Label(Godot.Label node) : base(node) { } - public override EditorTools3_Label Clone() => new ((Godot.Label)Instance.Duplicate()); + public EditorTools3_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override EditorTools3_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer5.Button /// - public class EditorTools3_Button : IUiNode + public class EditorTools3_Button : UiNode { - public EditorTools3_Button(Godot.Button node) : base(node) { } - public override EditorTools3_Button Clone() => new ((Godot.Button)Instance.Duplicate()); + public EditorTools3_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override EditorTools3_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer5 /// - public class EditorTools_HBoxContainer5 : IUiNode + public class EditorTools_HBoxContainer5 : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label @@ -260,7 +260,7 @@ { get { - if (_L_Label == null) _L_Label = new EditorTools3_Label(Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new EditorTools3_Label(UiPanel, Instance.GetNodeOrNull("Label")); return _L_Label; } } @@ -273,83 +273,83 @@ { get { - if (_L_Button == null) _L_Button = new EditorTools3_Button(Instance.GetNodeOrNull("Button")); + if (_L_Button == null) _L_Button = new EditorTools3_Button(UiPanel, Instance.GetNodeOrNull("Button")); return _L_Button; } } private EditorTools3_Button _L_Button; - public EditorTools_HBoxContainer5(Godot.HBoxContainer node) : base(node) { } - public override EditorTools_HBoxContainer5 Clone() => new ((Godot.HBoxContainer)Instance.Duplicate()); + public EditorTools_HBoxContainer5(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override EditorTools_HBoxContainer5 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.Label /// - public class EditorTools4_Label : IUiNode + public class EditorTools4_Label : UiNode { - public EditorTools4_Label(Godot.Label node) : base(node) { } - public override EditorTools4_Label Clone() => new ((Godot.Label)Instance.Duplicate()); + public EditorTools4_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override EditorTools4_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.RoomNameInput /// - public class EditorTools_RoomNameInput : IUiNode + public class EditorTools_RoomNameInput : UiNode { - public EditorTools_RoomNameInput(Godot.LineEdit node) : base(node) { } - public override EditorTools_RoomNameInput Clone() => new ((Godot.LineEdit)Instance.Duplicate()); + public EditorTools_RoomNameInput(EditorTools uiPanel, Godot.LineEdit node) : base(uiPanel, node) { } + public override EditorTools_RoomNameInput Clone() => new (UiPanel, (Godot.LineEdit)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.Label2 /// - public class EditorTools_Label2 : IUiNode + public class EditorTools_Label2 : UiNode { - public EditorTools_Label2(Godot.Label node) : base(node) { } - public override EditorTools_Label2 Clone() => new ((Godot.Label)Instance.Duplicate()); + public EditorTools_Label2(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override EditorTools_Label2 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.RoomGroupSelect /// - public class EditorTools_RoomGroupSelect : IUiNode + public class EditorTools_RoomGroupSelect : UiNode { - public EditorTools_RoomGroupSelect(Godot.OptionButton node) : base(node) { } - public override EditorTools_RoomGroupSelect Clone() => new ((Godot.OptionButton)Instance.Duplicate()); + public EditorTools_RoomGroupSelect(EditorTools uiPanel, Godot.OptionButton node) : base(uiPanel, node) { } + public override EditorTools_RoomGroupSelect Clone() => new (UiPanel, (Godot.OptionButton)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.Label3 /// - public class EditorTools_Label3 : IUiNode + public class EditorTools_Label3 : UiNode { - public EditorTools_Label3(Godot.Label node) : base(node) { } - public override EditorTools_Label3 Clone() => new ((Godot.Label)Instance.Duplicate()); + public EditorTools_Label3(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override EditorTools_Label3 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.RoomTypeSelect /// - public class EditorTools_RoomTypeSelect : IUiNode + public class EditorTools_RoomTypeSelect : UiNode { - public EditorTools_RoomTypeSelect(Godot.OptionButton node) : base(node) { } - public override EditorTools_RoomTypeSelect Clone() => new ((Godot.OptionButton)Instance.Duplicate()); + public EditorTools_RoomTypeSelect(EditorTools uiPanel, Godot.OptionButton node) : base(uiPanel, node) { } + public override EditorTools_RoomTypeSelect Clone() => new (UiPanel, (Godot.OptionButton)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.Button /// - public class EditorTools4_Button : IUiNode + public class EditorTools4_Button : UiNode { - public EditorTools4_Button(Godot.Button node) : base(node) { } - public override EditorTools4_Button Clone() => new ((Godot.Button)Instance.Duplicate()); + public EditorTools4_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override EditorTools4_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6 /// - public class EditorTools_HBoxContainer6 : IUiNode + public class EditorTools_HBoxContainer6 : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label @@ -358,7 +358,7 @@ { get { - if (_L_Label == null) _L_Label = new EditorTools4_Label(Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new EditorTools4_Label(UiPanel, Instance.GetNodeOrNull("Label")); return _L_Label; } } @@ -371,7 +371,7 @@ { get { - if (_L_RoomNameInput == null) _L_RoomNameInput = new EditorTools_RoomNameInput(Instance.GetNodeOrNull("RoomNameInput")); + if (_L_RoomNameInput == null) _L_RoomNameInput = new EditorTools_RoomNameInput(UiPanel, Instance.GetNodeOrNull("RoomNameInput")); return _L_RoomNameInput; } } @@ -384,7 +384,7 @@ { get { - if (_L_Label2 == null) _L_Label2 = new EditorTools_Label2(Instance.GetNodeOrNull("Label2")); + if (_L_Label2 == null) _L_Label2 = new EditorTools_Label2(UiPanel, Instance.GetNodeOrNull("Label2")); return _L_Label2; } } @@ -397,7 +397,7 @@ { get { - if (_L_RoomGroupSelect == null) _L_RoomGroupSelect = new EditorTools_RoomGroupSelect(Instance.GetNodeOrNull("RoomGroupSelect")); + if (_L_RoomGroupSelect == null) _L_RoomGroupSelect = new EditorTools_RoomGroupSelect(UiPanel, Instance.GetNodeOrNull("RoomGroupSelect")); return _L_RoomGroupSelect; } } @@ -410,7 +410,7 @@ { get { - if (_L_Label3 == null) _L_Label3 = new EditorTools_Label3(Instance.GetNodeOrNull("Label3")); + if (_L_Label3 == null) _L_Label3 = new EditorTools_Label3(UiPanel, Instance.GetNodeOrNull("Label3")); return _L_Label3; } } @@ -423,7 +423,7 @@ { get { - if (_L_RoomTypeSelect == null) _L_RoomTypeSelect = new EditorTools_RoomTypeSelect(Instance.GetNodeOrNull("RoomTypeSelect")); + if (_L_RoomTypeSelect == null) _L_RoomTypeSelect = new EditorTools_RoomTypeSelect(UiPanel, Instance.GetNodeOrNull("RoomTypeSelect")); return _L_RoomTypeSelect; } } @@ -436,38 +436,38 @@ { get { - if (_L_Button == null) _L_Button = new EditorTools4_Button(Instance.GetNodeOrNull("Button")); + if (_L_Button == null) _L_Button = new EditorTools4_Button(UiPanel, Instance.GetNodeOrNull("Button")); return _L_Button; } } private EditorTools4_Button _L_Button; - public EditorTools_HBoxContainer6(Godot.HBoxContainer node) : base(node) { } - public override EditorTools_HBoxContainer6 Clone() => new ((Godot.HBoxContainer)Instance.Duplicate()); + public EditorTools_HBoxContainer6(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override EditorTools_HBoxContainer6 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer2.Label /// - public class EditorTools5_Label : IUiNode + public class EditorTools5_Label : UiNode { - public EditorTools5_Label(Godot.Label node) : base(node) { } - public override EditorTools5_Label Clone() => new ((Godot.Label)Instance.Duplicate()); + public EditorTools5_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override EditorTools5_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer2.Button /// - public class EditorTools5_Button : IUiNode + public class EditorTools5_Button : UiNode { - public EditorTools5_Button(Godot.Button node) : base(node) { } - public override EditorTools5_Button Clone() => new ((Godot.Button)Instance.Duplicate()); + public EditorTools5_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override EditorTools5_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer2 /// - public class EditorTools_HBoxContainer2 : IUiNode + public class EditorTools_HBoxContainer2 : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label @@ -476,7 +476,7 @@ { get { - if (_L_Label == null) _L_Label = new EditorTools5_Label(Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new EditorTools5_Label(UiPanel, Instance.GetNodeOrNull("Label")); return _L_Label; } } @@ -489,38 +489,38 @@ { get { - if (_L_Button == null) _L_Button = new EditorTools5_Button(Instance.GetNodeOrNull("Button")); + if (_L_Button == null) _L_Button = new EditorTools5_Button(UiPanel, Instance.GetNodeOrNull("Button")); return _L_Button; } } private EditorTools5_Button _L_Button; - public EditorTools_HBoxContainer2(Godot.HBoxContainer node) : base(node) { } - public override EditorTools_HBoxContainer2 Clone() => new ((Godot.HBoxContainer)Instance.Duplicate()); + public EditorTools_HBoxContainer2(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override EditorTools_HBoxContainer2 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7.Label /// - public class EditorTools6_Label : IUiNode + public class EditorTools6_Label : UiNode { - public EditorTools6_Label(Godot.Label node) : base(node) { } - public override EditorTools6_Label Clone() => new ((Godot.Label)Instance.Duplicate()); + public EditorTools6_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override EditorTools6_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7.Button /// - public class EditorTools6_Button : IUiNode + public class EditorTools6_Button : UiNode { - public EditorTools6_Button(Godot.Button node) : base(node) { } - public override EditorTools6_Button Clone() => new ((Godot.Button)Instance.Duplicate()); + public EditorTools6_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override EditorTools6_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7 /// - public class EditorTools_HBoxContainer7 : IUiNode + public class EditorTools_HBoxContainer7 : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label @@ -529,7 +529,7 @@ { get { - if (_L_Label == null) _L_Label = new EditorTools6_Label(Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new EditorTools6_Label(UiPanel, Instance.GetNodeOrNull("Label")); return _L_Label; } } @@ -542,20 +542,20 @@ { get { - if (_L_Button == null) _L_Button = new EditorTools6_Button(Instance.GetNodeOrNull("Button")); + if (_L_Button == null) _L_Button = new EditorTools6_Button(UiPanel, Instance.GetNodeOrNull("Button")); return _L_Button; } } private EditorTools6_Button _L_Button; - public EditorTools_HBoxContainer7(Godot.HBoxContainer node) : base(node) { } - public override EditorTools_HBoxContainer7 Clone() => new ((Godot.HBoxContainer)Instance.Duplicate()); + public EditorTools_HBoxContainer7(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override EditorTools_HBoxContainer7 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer /// - public class EditorTools_VBoxContainer : IUiNode + public class EditorTools_VBoxContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.HBoxContainer @@ -564,7 +564,7 @@ { get { - if (_L_HBoxContainer == null) _L_HBoxContainer = new EditorTools_HBoxContainer(Instance.GetNodeOrNull("HBoxContainer")); + if (_L_HBoxContainer == null) _L_HBoxContainer = new EditorTools_HBoxContainer(UiPanel, Instance.GetNodeOrNull("HBoxContainer")); return _L_HBoxContainer; } } @@ -577,7 +577,7 @@ { get { - if (_L_HBoxContainer3 == null) _L_HBoxContainer3 = new EditorTools_HBoxContainer3(Instance.GetNodeOrNull("HBoxContainer3")); + if (_L_HBoxContainer3 == null) _L_HBoxContainer3 = new EditorTools_HBoxContainer3(UiPanel, Instance.GetNodeOrNull("HBoxContainer3")); return _L_HBoxContainer3; } } @@ -590,7 +590,7 @@ { get { - if (_L_HBoxContainer4 == null) _L_HBoxContainer4 = new EditorTools_HBoxContainer4(Instance.GetNodeOrNull("HBoxContainer4")); + if (_L_HBoxContainer4 == null) _L_HBoxContainer4 = new EditorTools_HBoxContainer4(UiPanel, Instance.GetNodeOrNull("HBoxContainer4")); return _L_HBoxContainer4; } } @@ -603,7 +603,7 @@ { get { - if (_L_HBoxContainer5 == null) _L_HBoxContainer5 = new EditorTools_HBoxContainer5(Instance.GetNodeOrNull("HBoxContainer5")); + if (_L_HBoxContainer5 == null) _L_HBoxContainer5 = new EditorTools_HBoxContainer5(UiPanel, Instance.GetNodeOrNull("HBoxContainer5")); return _L_HBoxContainer5; } } @@ -616,7 +616,7 @@ { get { - if (_L_HBoxContainer6 == null) _L_HBoxContainer6 = new EditorTools_HBoxContainer6(Instance.GetNodeOrNull("HBoxContainer6")); + if (_L_HBoxContainer6 == null) _L_HBoxContainer6 = new EditorTools_HBoxContainer6(UiPanel, Instance.GetNodeOrNull("HBoxContainer6")); return _L_HBoxContainer6; } } @@ -629,7 +629,7 @@ { get { - if (_L_HBoxContainer2 == null) _L_HBoxContainer2 = new EditorTools_HBoxContainer2(Instance.GetNodeOrNull("HBoxContainer2")); + if (_L_HBoxContainer2 == null) _L_HBoxContainer2 = new EditorTools_HBoxContainer2(UiPanel, Instance.GetNodeOrNull("HBoxContainer2")); return _L_HBoxContainer2; } } @@ -642,20 +642,20 @@ { get { - if (_L_HBoxContainer7 == null) _L_HBoxContainer7 = new EditorTools_HBoxContainer7(Instance.GetNodeOrNull("HBoxContainer7")); + if (_L_HBoxContainer7 == null) _L_HBoxContainer7 = new EditorTools_HBoxContainer7(UiPanel, Instance.GetNodeOrNull("HBoxContainer7")); return _L_HBoxContainer7; } } private EditorTools_HBoxContainer7 _L_HBoxContainer7; - public EditorTools_VBoxContainer(Godot.VBoxContainer node) : base(node) { } - public override EditorTools_VBoxContainer Clone() => new ((Godot.VBoxContainer)Instance.Duplicate()); + public EditorTools_VBoxContainer(EditorTools uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } + public override EditorTools_VBoxContainer Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer /// - public class EditorTools_MarginContainer : IUiNode + public class EditorTools_MarginContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.VBoxContainer @@ -664,20 +664,20 @@ { get { - if (_L_VBoxContainer == null) _L_VBoxContainer = new EditorTools_VBoxContainer(Instance.GetNodeOrNull("VBoxContainer")); + if (_L_VBoxContainer == null) _L_VBoxContainer = new EditorTools_VBoxContainer(UiPanel, Instance.GetNodeOrNull("VBoxContainer")); return _L_VBoxContainer; } } private EditorTools_VBoxContainer _L_VBoxContainer; - public EditorTools_MarginContainer(Godot.MarginContainer node) : base(node) { } - public override EditorTools_MarginContainer Clone() => new ((Godot.MarginContainer)Instance.Duplicate()); + public EditorTools_MarginContainer(EditorTools uiPanel, Godot.MarginContainer node) : base(uiPanel, node) { } + public override EditorTools_MarginContainer Clone() => new (UiPanel, (Godot.MarginContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer /// - public class EditorTools_ScrollContainer : IUiNode + public class EditorTools_ScrollContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.MarginContainer @@ -686,32 +686,32 @@ { get { - if (_L_MarginContainer == null) _L_MarginContainer = new EditorTools_MarginContainer(Instance.GetNodeOrNull("MarginContainer")); + if (_L_MarginContainer == null) _L_MarginContainer = new EditorTools_MarginContainer(UiPanel, Instance.GetNodeOrNull("MarginContainer")); return _L_MarginContainer; } } private EditorTools_MarginContainer _L_MarginContainer; - public EditorTools_ScrollContainer(Godot.ScrollContainer node) : base(node) { } - public override EditorTools_ScrollContainer Clone() => new ((Godot.ScrollContainer)Instance.Duplicate()); + public EditorTools_ScrollContainer(EditorTools uiPanel, Godot.ScrollContainer node) : base(uiPanel, node) { } + public override EditorTools_ScrollContainer Clone() => new (UiPanel, (Godot.ScrollContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.Confirm /// - public class EditorTools_Confirm : IUiNode + public class EditorTools_Confirm : UiNode { - public EditorTools_Confirm(Godot.ConfirmationDialog node) : base(node) { } - public override EditorTools_Confirm Clone() => new ((Godot.ConfirmationDialog)Instance.Duplicate()); + public EditorTools_Confirm(EditorTools uiPanel, Godot.ConfirmationDialog node) : base(uiPanel, node) { } + public override EditorTools_Confirm Clone() => new (UiPanel, (Godot.ConfirmationDialog)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.Tips /// - public class EditorTools_Tips : IUiNode + public class EditorTools_Tips : UiNode { - public EditorTools_Tips(Godot.AcceptDialog node) : base(node) { } - public override EditorTools_Tips Clone() => new ((Godot.AcceptDialog)Instance.Duplicate()); + public EditorTools_Tips(EditorTools uiPanel, Godot.AcceptDialog node) : base(uiPanel, node) { } + public override EditorTools_Tips Clone() => new (UiPanel, (Godot.AcceptDialog)Instance.Duplicate()); } diff --git a/DungeonShooting_Godot/src/game/ui/loading/Loading.cs b/DungeonShooting_Godot/src/game/ui/loading/Loading.cs index b061156..a30a2ef 100644 --- a/DungeonShooting_Godot/src/game/ui/loading/Loading.cs +++ b/DungeonShooting_Godot/src/game/ui/loading/Loading.cs @@ -12,7 +12,7 @@ { get { - if (_L_ColorRect == null) _L_ColorRect = new Loading_ColorRect(GetNodeOrNull("ColorRect")); + if (_L_ColorRect == null) _L_ColorRect = new Loading_ColorRect(this, GetNodeOrNull("ColorRect")); return _L_ColorRect; } } @@ -25,7 +25,7 @@ { get { - if (_L_Label == null) _L_Label = new Loading_Label(GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new Loading_Label(this, GetNodeOrNull("Label")); return _L_Label; } } @@ -39,19 +39,19 @@ /// /// 类型: , 路径: Loading.ColorRect /// - public class Loading_ColorRect : IUiNode + public class Loading_ColorRect : UiNode { - public Loading_ColorRect(Godot.ColorRect node) : base(node) { } - public override Loading_ColorRect Clone() => new ((Godot.ColorRect)Instance.Duplicate()); + public Loading_ColorRect(Loading uiPanel, Godot.ColorRect node) : base(uiPanel, node) { } + public override Loading_ColorRect Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate()); } /// /// 类型: , 路径: Loading.Label /// - public class Loading_Label : IUiNode + public class Loading_Label : UiNode { - public Loading_Label(Godot.Label node) : base(node) { } - public override Loading_Label Clone() => new ((Godot.Label)Instance.Duplicate()); + public Loading_Label(Loading uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Loading_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } diff --git a/DungeonShooting_Godot/src/game/ui/main/Main.cs b/DungeonShooting_Godot/src/game/ui/main/Main.cs index d0f4d98..e27885a 100644 --- a/DungeonShooting_Godot/src/game/ui/main/Main.cs +++ b/DungeonShooting_Godot/src/game/ui/main/Main.cs @@ -12,7 +12,7 @@ { get { - if (_L_Title == null) _L_Title = new Main_Title(GetNodeOrNull("Title")); + if (_L_Title == null) _L_Title = new Main_Title(this, GetNodeOrNull("Title")); return _L_Title; } } @@ -25,7 +25,7 @@ { get { - if (_L_ButtonList == null) _L_ButtonList = new Main_ButtonList(GetNodeOrNull("ButtonList")); + if (_L_ButtonList == null) _L_ButtonList = new Main_ButtonList(this, GetNodeOrNull("ButtonList")); return _L_ButtonList; } } @@ -38,7 +38,7 @@ { get { - if (_L_Version == null) _L_Version = new Main_Version(GetNodeOrNull("Version")); + if (_L_Version == null) _L_Version = new Main_Version(this, GetNodeOrNull("Version")); return _L_Version; } } @@ -52,52 +52,52 @@ /// /// 类型: , 路径: Main.Title /// - public class Main_Title : IUiNode + public class Main_Title : UiNode { - public Main_Title(Godot.Label node) : base(node) { } - public override Main_Title Clone() => new ((Godot.Label)Instance.Duplicate()); + public Main_Title(Main uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Main_Title Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: Main.ButtonList.Start /// - public class Main_Start : IUiNode + public class Main_Start : UiNode { - public Main_Start(Godot.Button node) : base(node) { } - public override Main_Start Clone() => new ((Godot.Button)Instance.Duplicate()); + public Main_Start(Main uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Main_Start Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: Main.ButtonList.Tools /// - public class Main_Tools : IUiNode + public class Main_Tools : UiNode { - public Main_Tools(Godot.Button node) : base(node) { } - public override Main_Tools Clone() => new ((Godot.Button)Instance.Duplicate()); + public Main_Tools(Main uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Main_Tools Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: Main.ButtonList.Setting /// - public class Main_Setting : IUiNode + public class Main_Setting : UiNode { - public Main_Setting(Godot.Button node) : base(node) { } - public override Main_Setting Clone() => new ((Godot.Button)Instance.Duplicate()); + public Main_Setting(Main uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Main_Setting Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: Main.ButtonList.Exit /// - public class Main_Exit : IUiNode + public class Main_Exit : UiNode { - public Main_Exit(Godot.Button node) : base(node) { } - public override Main_Exit Clone() => new ((Godot.Button)Instance.Duplicate()); + public Main_Exit(Main uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Main_Exit Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: Main.ButtonList /// - public class Main_ButtonList : IUiNode + public class Main_ButtonList : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.Start @@ -106,7 +106,7 @@ { get { - if (_L_Start == null) _L_Start = new Main_Start(Instance.GetNodeOrNull("Start")); + if (_L_Start == null) _L_Start = new Main_Start(UiPanel, Instance.GetNodeOrNull("Start")); return _L_Start; } } @@ -119,7 +119,7 @@ { get { - if (_L_Tools == null) _L_Tools = new Main_Tools(Instance.GetNodeOrNull("Tools")); + if (_L_Tools == null) _L_Tools = new Main_Tools(UiPanel, Instance.GetNodeOrNull("Tools")); return _L_Tools; } } @@ -132,7 +132,7 @@ { get { - if (_L_Setting == null) _L_Setting = new Main_Setting(Instance.GetNodeOrNull("Setting")); + if (_L_Setting == null) _L_Setting = new Main_Setting(UiPanel, Instance.GetNodeOrNull("Setting")); return _L_Setting; } } @@ -145,23 +145,23 @@ { get { - if (_L_Exit == null) _L_Exit = new Main_Exit(Instance.GetNodeOrNull("Exit")); + if (_L_Exit == null) _L_Exit = new Main_Exit(UiPanel, Instance.GetNodeOrNull("Exit")); return _L_Exit; } } private Main_Exit _L_Exit; - public Main_ButtonList(Godot.VBoxContainer node) : base(node) { } - public override Main_ButtonList Clone() => new ((Godot.VBoxContainer)Instance.Duplicate()); + public Main_ButtonList(Main uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } + public override Main_ButtonList Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: Main.Version /// - public class Main_Version : IUiNode + public class Main_Version : UiNode { - public Main_Version(Godot.Label node) : base(node) { } - public override Main_Version Clone() => new ((Godot.Label)Instance.Duplicate()); + public Main_Version(Main uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Main_Version Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } diff --git a/DungeonShooting_Godot/src/game/ui/main/MainPanel.cs b/DungeonShooting_Godot/src/game/ui/main/MainPanel.cs index 4b03178..9661ce0 100644 --- a/DungeonShooting_Godot/src/game/ui/main/MainPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/main/MainPanel.cs @@ -21,8 +21,7 @@ S_Exit.Instance.Pressed -= OnExitClick; S_Tools.Instance.Pressed -= OnToolsClick; } - - + //点击开始游戏 private void OnStartGameClick() { diff --git a/DungeonShooting_Godot/src/game/ui/mapEditor/MapEditor.cs b/DungeonShooting_Godot/src/game/ui/mapEditor/MapEditor.cs index 92d735e..6104242 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditor/MapEditor.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditor/MapEditor.cs @@ -12,7 +12,7 @@ { get { - if (_L_Bg == null) _L_Bg = new MapEditor_Bg(GetNodeOrNull("Bg")); + if (_L_Bg == null) _L_Bg = new MapEditor_Bg(this, GetNodeOrNull("Bg")); return _L_Bg; } } @@ -26,16 +26,16 @@ /// /// 类型: , 路径: MapEditor.Bg.HSplitContainer.Left.MapView.SubViewport.TileMap.Draw /// - public class MapEditor_Draw : IUiNode + public class MapEditor_Draw : UiNode { - public MapEditor_Draw(Godot.Node2D node) : base(node) { } - public override MapEditor_Draw Clone() => new ((Godot.Node2D)Instance.Duplicate()); + public MapEditor_Draw(MapEditor uiPanel, Godot.Node2D node) : base(uiPanel, node) { } + public override MapEditor_Draw Clone() => new (UiPanel, (Godot.Node2D)Instance.Duplicate()); } /// /// 类型: , 路径: MapEditor.Bg.HSplitContainer.Left.MapView.SubViewport.TileMap /// - public class MapEditor_TileMap : IUiNode + public class MapEditor_TileMap : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditor.Bg.HSplitContainer.Left.MapView.SubViewport.Draw @@ -44,20 +44,29 @@ { get { - if (_L_Draw == null) _L_Draw = new MapEditor_Draw(Instance.GetNodeOrNull("Draw")); + if (_L_Draw == null) _L_Draw = new MapEditor_Draw(UiPanel, Instance.GetNodeOrNull("Draw")); return _L_Draw; } } private MapEditor_Draw _L_Draw; - public MapEditor_TileMap(UI.MapEditor.EditorTileMap node) : base(node) { } - public override MapEditor_TileMap Clone() => new ((UI.MapEditor.EditorTileMap)Instance.Duplicate()); + public MapEditor_TileMap(MapEditor uiPanel, UI.MapEditor.EditorTileMap node) : base(uiPanel, node) { } + public override MapEditor_TileMap Clone() => new (UiPanel, (UI.MapEditor.EditorTileMap)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditor.Bg.HSplitContainer.Left.MapView.SubViewport.CanvasLayer + /// + public class MapEditor_CanvasLayer : UiNode + { + public MapEditor_CanvasLayer(MapEditor uiPanel, Godot.CanvasLayer node) : base(uiPanel, node) { } + public override MapEditor_CanvasLayer Clone() => new (UiPanel, (Godot.CanvasLayer)Instance.Duplicate()); } /// /// 类型: , 路径: MapEditor.Bg.HSplitContainer.Left.MapView.SubViewport /// - public class MapEditor_SubViewport : IUiNode + public class MapEditor_SubViewport : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditor.Bg.HSplitContainer.Left.MapView.TileMap @@ -66,20 +75,33 @@ { get { - if (_L_TileMap == null) _L_TileMap = new MapEditor_TileMap(Instance.GetNodeOrNull("TileMap")); + if (_L_TileMap == null) _L_TileMap = new MapEditor_TileMap(UiPanel, Instance.GetNodeOrNull("TileMap")); return _L_TileMap; } } private MapEditor_TileMap _L_TileMap; - public MapEditor_SubViewport(Godot.SubViewport node) : base(node) { } - public override MapEditor_SubViewport Clone() => new ((Godot.SubViewport)Instance.Duplicate()); + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditor.Bg.HSplitContainer.Left.MapView.CanvasLayer + /// + public MapEditor_CanvasLayer L_CanvasLayer + { + get + { + if (_L_CanvasLayer == null) _L_CanvasLayer = new MapEditor_CanvasLayer(UiPanel, Instance.GetNodeOrNull("CanvasLayer")); + return _L_CanvasLayer; + } + } + private MapEditor_CanvasLayer _L_CanvasLayer; + + public MapEditor_SubViewport(MapEditor uiPanel, Godot.SubViewport node) : base(uiPanel, node) { } + public override MapEditor_SubViewport Clone() => new (UiPanel, (Godot.SubViewport)Instance.Duplicate()); } /// /// 类型: , 路径: MapEditor.Bg.HSplitContainer.Left.MapView /// - public class MapEditor_MapView : IUiNode + public class MapEditor_MapView : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditor.Bg.HSplitContainer.Left.SubViewport @@ -88,20 +110,20 @@ { get { - if (_L_SubViewport == null) _L_SubViewport = new MapEditor_SubViewport(Instance.GetNodeOrNull("SubViewport")); + if (_L_SubViewport == null) _L_SubViewport = new MapEditor_SubViewport(UiPanel, Instance.GetNodeOrNull("SubViewport")); return _L_SubViewport; } } private MapEditor_SubViewport _L_SubViewport; - public MapEditor_MapView(Godot.SubViewportContainer node) : base(node) { } - public override MapEditor_MapView Clone() => new ((Godot.SubViewportContainer)Instance.Duplicate()); + public MapEditor_MapView(MapEditor uiPanel, Godot.SubViewportContainer node) : base(uiPanel, node) { } + public override MapEditor_MapView Clone() => new (UiPanel, (Godot.SubViewportContainer)Instance.Duplicate()); } /// /// 类型: , 路径: MapEditor.Bg.HSplitContainer.Left /// - public class MapEditor_Left : IUiNode + public class MapEditor_Left : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditor.Bg.HSplitContainer.MapView @@ -110,29 +132,29 @@ { get { - if (_L_MapView == null) _L_MapView = new MapEditor_MapView(Instance.GetNodeOrNull("MapView")); + if (_L_MapView == null) _L_MapView = new MapEditor_MapView(UiPanel, Instance.GetNodeOrNull("MapView")); return _L_MapView; } } private MapEditor_MapView _L_MapView; - public MapEditor_Left(Godot.Panel node) : base(node) { } - public override MapEditor_Left Clone() => new ((Godot.Panel)Instance.Duplicate()); + public MapEditor_Left(MapEditor uiPanel, Godot.Panel node) : base(uiPanel, node) { } + public override MapEditor_Left Clone() => new (UiPanel, (Godot.Panel)Instance.Duplicate()); } /// /// 类型: , 路径: MapEditor.Bg.HSplitContainer.Right /// - public class MapEditor_Right : IUiNode + public class MapEditor_Right : UiNode { - public MapEditor_Right(Godot.Panel node) : base(node) { } - public override MapEditor_Right Clone() => new ((Godot.Panel)Instance.Duplicate()); + public MapEditor_Right(MapEditor uiPanel, Godot.Panel node) : base(uiPanel, node) { } + public override MapEditor_Right Clone() => new (UiPanel, (Godot.Panel)Instance.Duplicate()); } /// /// 类型: , 路径: MapEditor.Bg.HSplitContainer /// - public class MapEditor_HSplitContainer : IUiNode + public class MapEditor_HSplitContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditor.Bg.Left @@ -141,7 +163,7 @@ { get { - if (_L_Left == null) _L_Left = new MapEditor_Left(Instance.GetNodeOrNull("Left")); + if (_L_Left == null) _L_Left = new MapEditor_Left(UiPanel, Instance.GetNodeOrNull("Left")); return _L_Left; } } @@ -154,20 +176,20 @@ { get { - if (_L_Right == null) _L_Right = new MapEditor_Right(Instance.GetNodeOrNull("Right")); + if (_L_Right == null) _L_Right = new MapEditor_Right(UiPanel, Instance.GetNodeOrNull("Right")); return _L_Right; } } private MapEditor_Right _L_Right; - public MapEditor_HSplitContainer(Godot.HSplitContainer node) : base(node) { } - public override MapEditor_HSplitContainer Clone() => new ((Godot.HSplitContainer)Instance.Duplicate()); + public MapEditor_HSplitContainer(MapEditor uiPanel, Godot.HSplitContainer node) : base(uiPanel, node) { } + public override MapEditor_HSplitContainer Clone() => new (UiPanel, (Godot.HSplitContainer)Instance.Duplicate()); } /// /// 类型: , 路径: MapEditor.Bg /// - public class MapEditor_Bg : IUiNode + public class MapEditor_Bg : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditor.HSplitContainer @@ -176,14 +198,14 @@ { get { - if (_L_HSplitContainer == null) _L_HSplitContainer = new MapEditor_HSplitContainer(Instance.GetNodeOrNull("HSplitContainer")); + if (_L_HSplitContainer == null) _L_HSplitContainer = new MapEditor_HSplitContainer(UiPanel, Instance.GetNodeOrNull("HSplitContainer")); return _L_HSplitContainer; } } private MapEditor_HSplitContainer _L_HSplitContainer; - public MapEditor_Bg(Godot.Panel node) : base(node) { } - public override MapEditor_Bg Clone() => new ((Godot.Panel)Instance.Duplicate()); + public MapEditor_Bg(MapEditor uiPanel, Godot.Panel node) : base(uiPanel, node) { } + public override MapEditor_Bg Clone() => new (UiPanel, (Godot.Panel)Instance.Duplicate()); } @@ -198,6 +220,11 @@ public MapEditor_TileMap S_TileMap => L_Bg.L_HSplitContainer.L_Left.L_MapView.L_SubViewport.L_TileMap; /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditor.Bg.HSplitContainer.Left.MapView.SubViewport.CanvasLayer + /// + public MapEditor_CanvasLayer S_CanvasLayer => L_Bg.L_HSplitContainer.L_Left.L_MapView.L_SubViewport.L_CanvasLayer; + + /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditor.Bg.HSplitContainer.Left.MapView.SubViewport /// public MapEditor_SubViewport S_SubViewport => L_Bg.L_HSplitContainer.L_Left.L_MapView.L_SubViewport; diff --git a/DungeonShooting_Godot/src/game/ui/mapEditor/MapEditorPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditor/MapEditorPanel.cs index 4620dde..97fb55e 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditor/MapEditorPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditor/MapEditorPanel.cs @@ -9,6 +9,7 @@ public override void OnCreateUi() { _editorTileMapBar = new EditorTileMapBar(S_TileMap); + S_CanvasLayer.OpenNestedUi(UiManager.UiName.MapEditorTools); } public override void OnShowUi() @@ -34,7 +35,6 @@ //调整地图显示区域大小 private void OnMapViewResized() { - GD.Print(S_Left.Instance.Size); S_SubViewport.Instance.Size = S_Left.Instance.Size.AsVector2I(); } } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorTools.cs b/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorTools.cs new file mode 100644 index 0000000..90d4527 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorTools.cs @@ -0,0 +1,149 @@ +namespace UI.MapEditorTools; + +/// +/// Ui代码, 该类是根据ui场景自动生成的, 请不要手动编辑该类, 以免造成代码丢失 +/// +public abstract partial class MapEditorTools : UiBase +{ + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorTools.HBoxContainer + /// + public MapEditorTools_HBoxContainer L_HBoxContainer + { + get + { + if (_L_HBoxContainer == null) _L_HBoxContainer = new MapEditorTools_HBoxContainer(this, GetNodeOrNull("HBoxContainer")); + return _L_HBoxContainer; + } + } + private MapEditorTools_HBoxContainer _L_HBoxContainer; + + + public MapEditorTools() : base(nameof(MapEditorTools)) + { + } + + /// + /// 类型: , 路径: MapEditorTools.HBoxContainer.TextureButton + /// + public class MapEditorTools_TextureButton : UiNode + { + public MapEditorTools_TextureButton(MapEditorTools uiPanel, Godot.TextureButton node) : base(uiPanel, node) { } + public override MapEditorTools_TextureButton Clone() => new (UiPanel, (Godot.TextureButton)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorTools.HBoxContainer.TextureButton2 + /// + public class MapEditorTools_TextureButton2 : UiNode + { + public MapEditorTools_TextureButton2(MapEditorTools uiPanel, Godot.TextureButton node) : base(uiPanel, node) { } + public override MapEditorTools_TextureButton2 Clone() => new (UiPanel, (Godot.TextureButton)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorTools.HBoxContainer.TextureButton3 + /// + public class MapEditorTools_TextureButton3 : UiNode + { + public MapEditorTools_TextureButton3(MapEditorTools uiPanel, Godot.TextureButton node) : base(uiPanel, node) { } + public override MapEditorTools_TextureButton3 Clone() => new (UiPanel, (Godot.TextureButton)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorTools.HBoxContainer.TextureButton4 + /// + public class MapEditorTools_TextureButton4 : UiNode + { + public MapEditorTools_TextureButton4(MapEditorTools uiPanel, Godot.TextureButton node) : base(uiPanel, node) { } + public override MapEditorTools_TextureButton4 Clone() => new (UiPanel, (Godot.TextureButton)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorTools.HBoxContainer + /// + public class MapEditorTools_HBoxContainer : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorTools.TextureButton + /// + public MapEditorTools_TextureButton L_TextureButton + { + get + { + if (_L_TextureButton == null) _L_TextureButton = new MapEditorTools_TextureButton(UiPanel, Instance.GetNodeOrNull("TextureButton")); + return _L_TextureButton; + } + } + private MapEditorTools_TextureButton _L_TextureButton; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorTools.TextureButton2 + /// + public MapEditorTools_TextureButton2 L_TextureButton2 + { + get + { + if (_L_TextureButton2 == null) _L_TextureButton2 = new MapEditorTools_TextureButton2(UiPanel, Instance.GetNodeOrNull("TextureButton2")); + return _L_TextureButton2; + } + } + private MapEditorTools_TextureButton2 _L_TextureButton2; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorTools.TextureButton3 + /// + public MapEditorTools_TextureButton3 L_TextureButton3 + { + get + { + if (_L_TextureButton3 == null) _L_TextureButton3 = new MapEditorTools_TextureButton3(UiPanel, Instance.GetNodeOrNull("TextureButton3")); + return _L_TextureButton3; + } + } + private MapEditorTools_TextureButton3 _L_TextureButton3; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorTools.TextureButton4 + /// + public MapEditorTools_TextureButton4 L_TextureButton4 + { + get + { + if (_L_TextureButton4 == null) _L_TextureButton4 = new MapEditorTools_TextureButton4(UiPanel, Instance.GetNodeOrNull("TextureButton4")); + return _L_TextureButton4; + } + } + private MapEditorTools_TextureButton4 _L_TextureButton4; + + public MapEditorTools_HBoxContainer(MapEditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override MapEditorTools_HBoxContainer Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + } + + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorTools.HBoxContainer.TextureButton + /// + public MapEditorTools_TextureButton S_TextureButton => L_HBoxContainer.L_TextureButton; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorTools.HBoxContainer.TextureButton2 + /// + public MapEditorTools_TextureButton2 S_TextureButton2 => L_HBoxContainer.L_TextureButton2; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorTools.HBoxContainer.TextureButton3 + /// + public MapEditorTools_TextureButton3 S_TextureButton3 => L_HBoxContainer.L_TextureButton3; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorTools.HBoxContainer.TextureButton4 + /// + public MapEditorTools_TextureButton4 S_TextureButton4 => L_HBoxContainer.L_TextureButton4; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorTools.HBoxContainer + /// + public MapEditorTools_HBoxContainer S_HBoxContainer => L_HBoxContainer; + +} diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorToolsPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorToolsPanel.cs new file mode 100644 index 0000000..88497b7 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorToolsPanel.cs @@ -0,0 +1,18 @@ +using Godot; + +namespace UI.MapEditorTools; + +public partial class MapEditorToolsPanel : MapEditorTools +{ + + public override void OnShowUi() + { + + } + + public override void OnHideUi() + { + + } + +} diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/LifeBar.cs b/DungeonShooting_Godot/src/game/ui/roomUI/LifeBar.cs index 9dce625..c6b28e7 100644 --- a/DungeonShooting_Godot/src/game/ui/roomUI/LifeBar.cs +++ b/DungeonShooting_Godot/src/game/ui/roomUI/LifeBar.cs @@ -7,7 +7,7 @@ { private RoomUI.RoomUI_LifeBar _bar; - private UiGrid _grid; + private UiGrid _grid; private EventFactory _eventFactory; private bool _refreshFlag = false; @@ -16,7 +16,7 @@ _bar = lifeBar; var uiNodeLife = lifeBar.L_Life; - _grid = new UiGrid(uiNodeLife, typeof(LifeCell), 20, 1, 2); + _grid = new UiGrid(uiNodeLife, typeof(LifeCell), 20, 1, 2); } public void OnShow() diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/LifeCell.cs b/DungeonShooting_Godot/src/game/ui/roomUI/LifeCell.cs index e9ca4b9..6076f4e 100644 --- a/DungeonShooting_Godot/src/game/ui/roomUI/LifeCell.cs +++ b/DungeonShooting_Godot/src/game/ui/roomUI/LifeCell.cs @@ -2,7 +2,7 @@ namespace UI.RoomUI; -public class LifeCell : UiCell +public class LifeCell : UiCell { private int _type = -1; diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUI.cs b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUI.cs index 53c3289..9123d37 100644 --- a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUI.cs +++ b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUI.cs @@ -12,7 +12,7 @@ { get { - if (_L_InteractiveTipBar == null) _L_InteractiveTipBar = new RoomUI_InteractiveTipBar(GetNodeOrNull("InteractiveTipBar")); + if (_L_InteractiveTipBar == null) _L_InteractiveTipBar = new RoomUI_InteractiveTipBar(this, GetNodeOrNull("InteractiveTipBar")); return _L_InteractiveTipBar; } } @@ -25,7 +25,7 @@ { get { - if (_L_ReloadBar == null) _L_ReloadBar = new RoomUI_ReloadBar(GetNodeOrNull("ReloadBar")); + if (_L_ReloadBar == null) _L_ReloadBar = new RoomUI_ReloadBar(this, GetNodeOrNull("ReloadBar")); return _L_ReloadBar; } } @@ -38,7 +38,7 @@ { get { - if (_L_Control == null) _L_Control = new RoomUI_Control(GetNodeOrNull("Control")); + if (_L_Control == null) _L_Control = new RoomUI_Control(this, GetNodeOrNull("Control")); return _L_Control; } } @@ -52,43 +52,43 @@ /// /// 类型: , 路径: RoomUI.InteractiveTipBar.Icon /// - public class RoomUI_Icon : IUiNode + public class RoomUI_Icon : UiNode { - public RoomUI_Icon(Godot.TextureRect node) : base(node) { } - public override RoomUI_Icon Clone() => new ((Godot.TextureRect)Instance.Duplicate()); + public RoomUI_Icon(RoomUI uiPanel, Godot.TextureRect node) : base(uiPanel, node) { } + public override RoomUI_Icon Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.InteractiveTipBar.InteractiveIcon /// - public class RoomUI_InteractiveIcon : IUiNode + public class RoomUI_InteractiveIcon : UiNode { - public RoomUI_InteractiveIcon(Godot.TextureRect node) : base(node) { } - public override RoomUI_InteractiveIcon Clone() => new ((Godot.TextureRect)Instance.Duplicate()); + public RoomUI_InteractiveIcon(RoomUI uiPanel, Godot.TextureRect node) : base(uiPanel, node) { } + public override RoomUI_InteractiveIcon Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.InteractiveTipBar.Line2D /// - public class RoomUI_Line2D : IUiNode + public class RoomUI_Line2D : UiNode { - public RoomUI_Line2D(Godot.Line2D node) : base(node) { } - public override RoomUI_Line2D Clone() => new ((Godot.Line2D)Instance.Duplicate()); + public RoomUI_Line2D(RoomUI uiPanel, Godot.Line2D node) : base(uiPanel, node) { } + public override RoomUI_Line2D Clone() => new (UiPanel, (Godot.Line2D)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.InteractiveTipBar.NameLabel /// - public class RoomUI_NameLabel : IUiNode + public class RoomUI_NameLabel : UiNode { - public RoomUI_NameLabel(Godot.Label node) : base(node) { } - public override RoomUI_NameLabel Clone() => new ((Godot.Label)Instance.Duplicate()); + public RoomUI_NameLabel(RoomUI uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override RoomUI_NameLabel Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.InteractiveTipBar /// - public class RoomUI_InteractiveTipBar : IUiNode + public class RoomUI_InteractiveTipBar : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Icon @@ -97,7 +97,7 @@ { get { - if (_L_Icon == null) _L_Icon = new RoomUI_Icon(Instance.GetNodeOrNull("Icon")); + if (_L_Icon == null) _L_Icon = new RoomUI_Icon(UiPanel, Instance.GetNodeOrNull("Icon")); return _L_Icon; } } @@ -110,7 +110,7 @@ { get { - if (_L_InteractiveIcon == null) _L_InteractiveIcon = new RoomUI_InteractiveIcon(Instance.GetNodeOrNull("InteractiveIcon")); + if (_L_InteractiveIcon == null) _L_InteractiveIcon = new RoomUI_InteractiveIcon(UiPanel, Instance.GetNodeOrNull("InteractiveIcon")); return _L_InteractiveIcon; } } @@ -123,7 +123,7 @@ { get { - if (_L_Line2D == null) _L_Line2D = new RoomUI_Line2D(Instance.GetNodeOrNull("Line2D")); + if (_L_Line2D == null) _L_Line2D = new RoomUI_Line2D(UiPanel, Instance.GetNodeOrNull("Line2D")); return _L_Line2D; } } @@ -136,29 +136,29 @@ { get { - if (_L_NameLabel == null) _L_NameLabel = new RoomUI_NameLabel(Instance.GetNodeOrNull("NameLabel")); + if (_L_NameLabel == null) _L_NameLabel = new RoomUI_NameLabel(UiPanel, Instance.GetNodeOrNull("NameLabel")); return _L_NameLabel; } } private RoomUI_NameLabel _L_NameLabel; - public RoomUI_InteractiveTipBar(Godot.Control node) : base(node) { } - public override RoomUI_InteractiveTipBar Clone() => new ((Godot.Control)Instance.Duplicate()); + public RoomUI_InteractiveTipBar(RoomUI uiPanel, Godot.Control node) : base(uiPanel, node) { } + public override RoomUI_InteractiveTipBar Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.ReloadBar.Slot.Block /// - public class RoomUI_Block : IUiNode + public class RoomUI_Block : UiNode { - public RoomUI_Block(Godot.Sprite2D node) : base(node) { } - public override RoomUI_Block Clone() => new ((Godot.Sprite2D)Instance.Duplicate()); + public RoomUI_Block(RoomUI uiPanel, Godot.Sprite2D node) : base(uiPanel, node) { } + public override RoomUI_Block Clone() => new (UiPanel, (Godot.Sprite2D)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.ReloadBar.Slot /// - public class RoomUI_Slot : IUiNode + public class RoomUI_Slot : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.ReloadBar.Block @@ -167,20 +167,20 @@ { get { - if (_L_Block == null) _L_Block = new RoomUI_Block(Instance.GetNodeOrNull("Block")); + if (_L_Block == null) _L_Block = new RoomUI_Block(UiPanel, Instance.GetNodeOrNull("Block")); return _L_Block; } } private RoomUI_Block _L_Block; - public RoomUI_Slot(Godot.TextureRect node) : base(node) { } - public override RoomUI_Slot Clone() => new ((Godot.TextureRect)Instance.Duplicate()); + public RoomUI_Slot(RoomUI uiPanel, Godot.TextureRect node) : base(uiPanel, node) { } + public override RoomUI_Slot Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.ReloadBar /// - public class RoomUI_ReloadBar : IUiNode + public class RoomUI_ReloadBar : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Slot @@ -189,29 +189,29 @@ { get { - if (_L_Slot == null) _L_Slot = new RoomUI_Slot(Instance.GetNodeOrNull("Slot")); + if (_L_Slot == null) _L_Slot = new RoomUI_Slot(UiPanel, Instance.GetNodeOrNull("Slot")); return _L_Slot; } } private RoomUI_Slot _L_Slot; - public RoomUI_ReloadBar(Godot.Control node) : base(node) { } - public override RoomUI_ReloadBar Clone() => new ((Godot.Control)Instance.Duplicate()); + public RoomUI_ReloadBar(RoomUI uiPanel, Godot.Control node) : base(uiPanel, node) { } + public override RoomUI_ReloadBar Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.LifeBar.Life /// - public class RoomUI_Life : IUiNode + public class RoomUI_Life : UiNode { - public RoomUI_Life(Godot.TextureRect node) : base(node) { } - public override RoomUI_Life Clone() => new ((Godot.TextureRect)Instance.Duplicate()); + public RoomUI_Life(RoomUI uiPanel, Godot.TextureRect node) : base(uiPanel, node) { } + public override RoomUI_Life Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.LifeBar /// - public class RoomUI_LifeBar : IUiNode + public class RoomUI_LifeBar : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Control.Life @@ -220,92 +220,92 @@ { get { - if (_L_Life == null) _L_Life = new RoomUI_Life(Instance.GetNodeOrNull("Life")); + if (_L_Life == null) _L_Life = new RoomUI_Life(UiPanel, Instance.GetNodeOrNull("Life")); return _L_Life; } } private RoomUI_Life _L_Life; - public RoomUI_LifeBar(Godot.Control node) : base(node) { } - public override RoomUI_LifeBar Clone() => new ((Godot.Control)Instance.Duplicate()); + public RoomUI_LifeBar(RoomUI uiPanel, Godot.Control node) : base(uiPanel, node) { } + public override RoomUI_LifeBar Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.MapBar /// - public class RoomUI_MapBar : IUiNode + public class RoomUI_MapBar : UiNode { - public RoomUI_MapBar(Godot.TextureRect node) : base(node) { } - public override RoomUI_MapBar Clone() => new ((Godot.TextureRect)Instance.Duplicate()); + public RoomUI_MapBar(RoomUI uiPanel, Godot.TextureRect node) : base(uiPanel, node) { } + public override RoomUI_MapBar Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.ActivePropBar.ActivePropBg /// - public class RoomUI_ActivePropBg : IUiNode + public class RoomUI_ActivePropBg : UiNode { - public RoomUI_ActivePropBg(Godot.NinePatchRect node) : base(node) { } - public override RoomUI_ActivePropBg Clone() => new ((Godot.NinePatchRect)Instance.Duplicate()); + public RoomUI_ActivePropBg(RoomUI uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { } + public override RoomUI_ActivePropBg Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.ActivePropBar.ActivePropSprite /// - public class RoomUI_ActivePropSprite : IUiNode + public class RoomUI_ActivePropSprite : UiNode { - public RoomUI_ActivePropSprite(Godot.TextureRect node) : base(node) { } - public override RoomUI_ActivePropSprite Clone() => new ((Godot.TextureRect)Instance.Duplicate()); + public RoomUI_ActivePropSprite(RoomUI uiPanel, Godot.TextureRect node) : base(uiPanel, node) { } + public override RoomUI_ActivePropSprite Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.ActivePropBar.CooldownProgress /// - public class RoomUI_CooldownProgress : IUiNode + public class RoomUI_CooldownProgress : UiNode { - public RoomUI_CooldownProgress(Godot.Sprite2D node) : base(node) { } - public override RoomUI_CooldownProgress Clone() => new ((Godot.Sprite2D)Instance.Duplicate()); + public RoomUI_CooldownProgress(RoomUI uiPanel, Godot.Sprite2D node) : base(uiPanel, node) { } + public override RoomUI_CooldownProgress Clone() => new (UiPanel, (Godot.Sprite2D)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.ActivePropBar.ActivePropCount /// - public class RoomUI_ActivePropCount : IUiNode + public class RoomUI_ActivePropCount : UiNode { - public RoomUI_ActivePropCount(Godot.Label node) : base(node) { } - public override RoomUI_ActivePropCount Clone() => new ((Godot.Label)Instance.Duplicate()); + public RoomUI_ActivePropCount(RoomUI uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override RoomUI_ActivePropCount Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.ActivePropBar.ActivePropPanel /// - public class RoomUI_ActivePropPanel : IUiNode + public class RoomUI_ActivePropPanel : UiNode { - public RoomUI_ActivePropPanel(Godot.NinePatchRect node) : base(node) { } - public override RoomUI_ActivePropPanel Clone() => new ((Godot.NinePatchRect)Instance.Duplicate()); + public RoomUI_ActivePropPanel(RoomUI uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { } + public override RoomUI_ActivePropPanel Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.ActivePropBar.ChargeProgressBar /// - public class RoomUI_ChargeProgressBar : IUiNode + public class RoomUI_ChargeProgressBar : UiNode { - public RoomUI_ChargeProgressBar(Godot.NinePatchRect node) : base(node) { } - public override RoomUI_ChargeProgressBar Clone() => new ((Godot.NinePatchRect)Instance.Duplicate()); + public RoomUI_ChargeProgressBar(RoomUI uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { } + public override RoomUI_ChargeProgressBar Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.ActivePropBar.ChargeProgress /// - public class RoomUI_ChargeProgress : IUiNode + public class RoomUI_ChargeProgress : UiNode { - public RoomUI_ChargeProgress(Godot.Sprite2D node) : base(node) { } - public override RoomUI_ChargeProgress Clone() => new ((Godot.Sprite2D)Instance.Duplicate()); + public RoomUI_ChargeProgress(RoomUI uiPanel, Godot.Sprite2D node) : base(uiPanel, node) { } + public override RoomUI_ChargeProgress Clone() => new (UiPanel, (Godot.Sprite2D)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.ActivePropBar /// - public class RoomUI_ActivePropBar : IUiNode + public class RoomUI_ActivePropBar : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Control.ActivePropBg @@ -314,7 +314,7 @@ { get { - if (_L_ActivePropBg == null) _L_ActivePropBg = new RoomUI_ActivePropBg(Instance.GetNodeOrNull("ActivePropBg")); + if (_L_ActivePropBg == null) _L_ActivePropBg = new RoomUI_ActivePropBg(UiPanel, Instance.GetNodeOrNull("ActivePropBg")); return _L_ActivePropBg; } } @@ -327,7 +327,7 @@ { get { - if (_L_ActivePropSprite == null) _L_ActivePropSprite = new RoomUI_ActivePropSprite(Instance.GetNodeOrNull("ActivePropSprite")); + if (_L_ActivePropSprite == null) _L_ActivePropSprite = new RoomUI_ActivePropSprite(UiPanel, Instance.GetNodeOrNull("ActivePropSprite")); return _L_ActivePropSprite; } } @@ -340,7 +340,7 @@ { get { - if (_L_CooldownProgress == null) _L_CooldownProgress = new RoomUI_CooldownProgress(Instance.GetNodeOrNull("CooldownProgress")); + if (_L_CooldownProgress == null) _L_CooldownProgress = new RoomUI_CooldownProgress(UiPanel, Instance.GetNodeOrNull("CooldownProgress")); return _L_CooldownProgress; } } @@ -353,7 +353,7 @@ { get { - if (_L_ActivePropCount == null) _L_ActivePropCount = new RoomUI_ActivePropCount(Instance.GetNodeOrNull("ActivePropCount")); + if (_L_ActivePropCount == null) _L_ActivePropCount = new RoomUI_ActivePropCount(UiPanel, Instance.GetNodeOrNull("ActivePropCount")); return _L_ActivePropCount; } } @@ -366,7 +366,7 @@ { get { - if (_L_ActivePropPanel == null) _L_ActivePropPanel = new RoomUI_ActivePropPanel(Instance.GetNodeOrNull("ActivePropPanel")); + if (_L_ActivePropPanel == null) _L_ActivePropPanel = new RoomUI_ActivePropPanel(UiPanel, Instance.GetNodeOrNull("ActivePropPanel")); return _L_ActivePropPanel; } } @@ -379,7 +379,7 @@ { get { - if (_L_ChargeProgressBar == null) _L_ChargeProgressBar = new RoomUI_ChargeProgressBar(Instance.GetNodeOrNull("ChargeProgressBar")); + if (_L_ChargeProgressBar == null) _L_ChargeProgressBar = new RoomUI_ChargeProgressBar(UiPanel, Instance.GetNodeOrNull("ChargeProgressBar")); return _L_ChargeProgressBar; } } @@ -392,29 +392,29 @@ { get { - if (_L_ChargeProgress == null) _L_ChargeProgress = new RoomUI_ChargeProgress(Instance.GetNodeOrNull("ChargeProgress")); + if (_L_ChargeProgress == null) _L_ChargeProgress = new RoomUI_ChargeProgress(UiPanel, Instance.GetNodeOrNull("ChargeProgress")); return _L_ChargeProgress; } } private RoomUI_ChargeProgress _L_ChargeProgress; - public RoomUI_ActivePropBar(Godot.Control node) : base(node) { } - public override RoomUI_ActivePropBar Clone() => new ((Godot.Control)Instance.Duplicate()); + public RoomUI_ActivePropBar(RoomUI uiPanel, Godot.Control node) : base(uiPanel, node) { } + public override RoomUI_ActivePropBar Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.WeaponBar.WeaponPanel.WeaponSprite /// - public class RoomUI_WeaponSprite : IUiNode + public class RoomUI_WeaponSprite : UiNode { - public RoomUI_WeaponSprite(Godot.TextureRect node) : base(node) { } - public override RoomUI_WeaponSprite Clone() => new ((Godot.TextureRect)Instance.Duplicate()); + public RoomUI_WeaponSprite(RoomUI uiPanel, Godot.TextureRect node) : base(uiPanel, node) { } + public override RoomUI_WeaponSprite Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.WeaponBar.WeaponPanel /// - public class RoomUI_WeaponPanel : IUiNode + public class RoomUI_WeaponPanel : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Control.WeaponBar.WeaponSprite @@ -423,29 +423,29 @@ { get { - if (_L_WeaponSprite == null) _L_WeaponSprite = new RoomUI_WeaponSprite(Instance.GetNodeOrNull("WeaponSprite")); + if (_L_WeaponSprite == null) _L_WeaponSprite = new RoomUI_WeaponSprite(UiPanel, Instance.GetNodeOrNull("WeaponSprite")); return _L_WeaponSprite; } } private RoomUI_WeaponSprite _L_WeaponSprite; - public RoomUI_WeaponPanel(Godot.NinePatchRect node) : base(node) { } - public override RoomUI_WeaponPanel Clone() => new ((Godot.NinePatchRect)Instance.Duplicate()); + public RoomUI_WeaponPanel(RoomUI uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { } + public override RoomUI_WeaponPanel Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.WeaponBar.AmmoCount /// - public class RoomUI_AmmoCount : IUiNode + public class RoomUI_AmmoCount : UiNode { - public RoomUI_AmmoCount(Godot.Label node) : base(node) { } - public override RoomUI_AmmoCount Clone() => new ((Godot.Label)Instance.Duplicate()); + public RoomUI_AmmoCount(RoomUI uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override RoomUI_AmmoCount Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control.WeaponBar /// - public class RoomUI_WeaponBar : IUiNode + public class RoomUI_WeaponBar : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Control.WeaponPanel @@ -454,7 +454,7 @@ { get { - if (_L_WeaponPanel == null) _L_WeaponPanel = new RoomUI_WeaponPanel(Instance.GetNodeOrNull("WeaponPanel")); + if (_L_WeaponPanel == null) _L_WeaponPanel = new RoomUI_WeaponPanel(UiPanel, Instance.GetNodeOrNull("WeaponPanel")); return _L_WeaponPanel; } } @@ -467,20 +467,20 @@ { get { - if (_L_AmmoCount == null) _L_AmmoCount = new RoomUI_AmmoCount(Instance.GetNodeOrNull("AmmoCount")); + if (_L_AmmoCount == null) _L_AmmoCount = new RoomUI_AmmoCount(UiPanel, Instance.GetNodeOrNull("AmmoCount")); return _L_AmmoCount; } } private RoomUI_AmmoCount _L_AmmoCount; - public RoomUI_WeaponBar(Godot.Control node) : base(node) { } - public override RoomUI_WeaponBar Clone() => new ((Godot.Control)Instance.Duplicate()); + public RoomUI_WeaponBar(RoomUI uiPanel, Godot.Control node) : base(uiPanel, node) { } + public override RoomUI_WeaponBar Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate()); } /// /// 类型: , 路径: RoomUI.Control /// - public class RoomUI_Control : IUiNode + public class RoomUI_Control : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.LifeBar @@ -489,7 +489,7 @@ { get { - if (_L_LifeBar == null) _L_LifeBar = new RoomUI_LifeBar(Instance.GetNodeOrNull("LifeBar")); + if (_L_LifeBar == null) _L_LifeBar = new RoomUI_LifeBar(UiPanel, Instance.GetNodeOrNull("LifeBar")); return _L_LifeBar; } } @@ -502,7 +502,7 @@ { get { - if (_L_MapBar == null) _L_MapBar = new RoomUI_MapBar(Instance.GetNodeOrNull("MapBar")); + if (_L_MapBar == null) _L_MapBar = new RoomUI_MapBar(UiPanel, Instance.GetNodeOrNull("MapBar")); return _L_MapBar; } } @@ -515,7 +515,7 @@ { get { - if (_L_ActivePropBar == null) _L_ActivePropBar = new RoomUI_ActivePropBar(Instance.GetNodeOrNull("ActivePropBar")); + if (_L_ActivePropBar == null) _L_ActivePropBar = new RoomUI_ActivePropBar(UiPanel, Instance.GetNodeOrNull("ActivePropBar")); return _L_ActivePropBar; } } @@ -528,14 +528,14 @@ { get { - if (_L_WeaponBar == null) _L_WeaponBar = new RoomUI_WeaponBar(Instance.GetNodeOrNull("WeaponBar")); + if (_L_WeaponBar == null) _L_WeaponBar = new RoomUI_WeaponBar(UiPanel, Instance.GetNodeOrNull("WeaponBar")); return _L_WeaponBar; } } private RoomUI_WeaponBar _L_WeaponBar; - public RoomUI_Control(Godot.Control node) : base(node) { } - public override RoomUI_Control Clone() => new ((Godot.Control)Instance.Duplicate()); + public RoomUI_Control(RoomUI uiPanel, Godot.Control node) : base(uiPanel, node) { } + public override RoomUI_Control Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate()); } diff --git a/DungeonShooting_Godot/src/game/ui/settlement/Settlement.cs b/DungeonShooting_Godot/src/game/ui/settlement/Settlement.cs index 12819d5..3c7eca0 100644 --- a/DungeonShooting_Godot/src/game/ui/settlement/Settlement.cs +++ b/DungeonShooting_Godot/src/game/ui/settlement/Settlement.cs @@ -12,7 +12,7 @@ { get { - if (_L_Bg == null) _L_Bg = new Settlement_Bg(GetNodeOrNull("Bg")); + if (_L_Bg == null) _L_Bg = new Settlement_Bg(this, GetNodeOrNull("Bg")); return _L_Bg; } } @@ -25,7 +25,7 @@ { get { - if (_L_Title == null) _L_Title = new Settlement_Title(GetNodeOrNull("Title")); + if (_L_Title == null) _L_Title = new Settlement_Title(this, GetNodeOrNull("Title")); return _L_Title; } } @@ -38,7 +38,7 @@ { get { - if (_L_ButtonList == null) _L_ButtonList = new Settlement_ButtonList(GetNodeOrNull("ButtonList")); + if (_L_ButtonList == null) _L_ButtonList = new Settlement_ButtonList(this, GetNodeOrNull("ButtonList")); return _L_ButtonList; } } @@ -52,43 +52,43 @@ /// /// 类型: , 路径: Settlement.Bg /// - public class Settlement_Bg : IUiNode + public class Settlement_Bg : UiNode { - public Settlement_Bg(Godot.ColorRect node) : base(node) { } - public override Settlement_Bg Clone() => new ((Godot.ColorRect)Instance.Duplicate()); + public Settlement_Bg(Settlement uiPanel, Godot.ColorRect node) : base(uiPanel, node) { } + public override Settlement_Bg Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate()); } /// /// 类型: , 路径: Settlement.Title /// - public class Settlement_Title : IUiNode + public class Settlement_Title : UiNode { - public Settlement_Title(Godot.Label node) : base(node) { } - public override Settlement_Title Clone() => new ((Godot.Label)Instance.Duplicate()); + public Settlement_Title(Settlement uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Settlement_Title Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: Settlement.ButtonList.Restart /// - public class Settlement_Restart : IUiNode + public class Settlement_Restart : UiNode { - public Settlement_Restart(Godot.Button node) : base(node) { } - public override Settlement_Restart Clone() => new ((Godot.Button)Instance.Duplicate()); + public Settlement_Restart(Settlement uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Settlement_Restart Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: Settlement.ButtonList.ToMenu /// - public class Settlement_ToMenu : IUiNode + public class Settlement_ToMenu : UiNode { - public Settlement_ToMenu(Godot.Button node) : base(node) { } - public override Settlement_ToMenu Clone() => new ((Godot.Button)Instance.Duplicate()); + public Settlement_ToMenu(Settlement uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Settlement_ToMenu Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: Settlement.ButtonList /// - public class Settlement_ButtonList : IUiNode + public class Settlement_ButtonList : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Settlement.Restart @@ -97,7 +97,7 @@ { get { - if (_L_Restart == null) _L_Restart = new Settlement_Restart(Instance.GetNodeOrNull("Restart")); + if (_L_Restart == null) _L_Restart = new Settlement_Restart(UiPanel, Instance.GetNodeOrNull("Restart")); return _L_Restart; } } @@ -110,14 +110,14 @@ { get { - if (_L_ToMenu == null) _L_ToMenu = new Settlement_ToMenu(Instance.GetNodeOrNull("ToMenu")); + if (_L_ToMenu == null) _L_ToMenu = new Settlement_ToMenu(UiPanel, Instance.GetNodeOrNull("ToMenu")); return _L_ToMenu; } } private Settlement_ToMenu _L_ToMenu; - public Settlement_ButtonList(Godot.VBoxContainer node) : base(node) { } - public override Settlement_ButtonList Clone() => new ((Godot.VBoxContainer)Instance.Duplicate()); + public Settlement_ButtonList(Settlement uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } + public override Settlement_ButtonList Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); }