diff --git a/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn b/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn new file mode 100644 index 0000000..dc706af --- /dev/null +++ b/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn @@ -0,0 +1,134 @@ +[gd_scene load_steps=6 format=3 uid="uid://b2xq02i3vxct"] + +[ext_resource type="Script" path="res://src/game/ui/encyclopedia/EncyclopediaPanel.cs" id="1_hd86y"] +[ext_resource type="Texture2D" uid="uid://blfvsup876agh" path="res://resource/sprite/ui/commonIcon/Search.png" id="2_3ln1u"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_o1xl7"] +[ext_resource type="Texture2D" uid="uid://bn47bmilcw4x0" path="res://resource/sprite/ui/commonIcon/Select2.png" id="4_gtlqd"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_gm0bl"] +resource_local_to_scene = true +shader = ExtResource("3_o1xl7") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(1, 1, 1, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true +shader_parameter/grey = 0.0 + +[node name="Encyclopedia" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource("1_hd86y") + +[node name="Panel2" type="Panel" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_stretch_ratio = 75.0 + +[node name="MarginContainer" type="MarginContainer" parent="Panel2"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 2 +theme_override_constants/margin_top = 2 +theme_override_constants/margin_right = 2 +theme_override_constants/margin_bottom = 2 + +[node name="VBoxContainer2" type="VBoxContainer" parent="Panel2/MarginContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="MarginContainer" type="MarginContainer" parent="Panel2/MarginContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_constants/margin_left = 2 +theme_override_constants/margin_top = 2 +theme_override_constants/margin_right = 2 +theme_override_constants/margin_bottom = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="Panel2/MarginContainer/VBoxContainer2/MarginContainer"] +custom_minimum_size = Vector2(0, 100) +layout_mode = 2 +size_flags_vertical = 3 + +[node name="LineEdit" type="LineEdit" parent="Panel2/MarginContainer/VBoxContainer2/MarginContainer/HBoxContainer"] +custom_minimum_size = Vector2(500, 44) +layout_mode = 2 +size_flags_vertical = 4 +placeholder_text = "搜索名称" + +[node name="Search" type="Button" parent="Panel2/MarginContainer/VBoxContainer2/MarginContainer/HBoxContainer"] +custom_minimum_size = Vector2(44, 44) +layout_mode = 2 +size_flags_vertical = 4 +icon = ExtResource("2_3ln1u") + +[node name="ScrollContainer" type="ScrollContainer" parent="Panel2/MarginContainer/VBoxContainer2"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +size_flags_stretch_ratio = 75.0 + +[node name="ObjectButton" type="Button" parent="Panel2/MarginContainer/VBoxContainer2/ScrollContainer"] +custom_minimum_size = Vector2(124, 160) +layout_mode = 2 + +[node name="PreviewImage" type="TextureRect" parent="Panel2/MarginContainer/VBoxContainer2/ScrollContainer/ObjectButton"] +material = SubResource("ShaderMaterial_gm0bl") +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 2.0 +offset_top = 2.0 +offset_right = -2.0 +offset_bottom = -38.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +expand_mode = 2 +stretch_mode = 5 + +[node name="ObjectName" type="Label" parent="Panel2/MarginContainer/VBoxContainer2/ScrollContainer/ObjectButton"] +layout_mode = 1 +anchors_preset = 12 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -43.0 +offset_right = 124.0 +offset_bottom = 43.0 +grow_horizontal = 2 +grow_vertical = 0 +scale = Vector2(0.5, 0.5) +text = "武器" +horizontal_alignment = 1 +vertical_alignment = 1 +autowrap_mode = 3 +clip_text = true +text_overrun_behavior = 3 + +[node name="Select" type="NinePatchRect" parent="Panel2/MarginContainer/VBoxContainer2/ScrollContainer/ObjectButton"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("4_gtlqd") +region_rect = Rect2(0, 0, 36, 36) +patch_margin_left = 8 +patch_margin_top = 8 +patch_margin_right = 8 +patch_margin_bottom = 8 diff --git a/DungeonShooting_Godot/prefab/ui/PauseMenu.tscn b/DungeonShooting_Godot/prefab/ui/PauseMenu.tscn index 421dd01..b6c1e3d 100644 --- a/DungeonShooting_Godot/prefab/ui/PauseMenu.tscn +++ b/DungeonShooting_Godot/prefab/ui/PauseMenu.tscn @@ -8,6 +8,8 @@ anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 script = ExtResource("1_ef73i") Layer = 2 @@ -50,6 +52,22 @@ theme = ExtResource("2_x1py5") text = "重新开始" +[node name="Encyclopedia" type="Button" parent="VBoxContainer"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 2 +focus_neighbor_top = NodePath("../Exit") +focus_neighbor_bottom = NodePath("../Setting") +theme = ExtResource("2_x1py5") +text = "图鉴" + +[node name="Setting" type="Button" parent="VBoxContainer"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 2 +focus_neighbor_top = NodePath("../Exit") +focus_neighbor_bottom = NodePath("../Setting") +theme = ExtResource("2_x1py5") +text = "设置" + [node name="Exit" type="Button" parent="VBoxContainer"] custom_minimum_size = Vector2(0, 50) layout_mode = 2 diff --git a/DungeonShooting_Godot/prefab/ui/WeaponRoulette.tscn b/DungeonShooting_Godot/prefab/ui/WeaponRoulette.tscn index 100d134..ea763b4 100644 --- a/DungeonShooting_Godot/prefab/ui/WeaponRoulette.tscn +++ b/DungeonShooting_Godot/prefab/ui/WeaponRoulette.tscn @@ -22,7 +22,6 @@ grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_1uvbk") -metadata/_edit_vertical_guides_ = [960.0, 1220.0] [node name="Bg" type="ColorRect" parent="."] layout_mode = 1 @@ -33,7 +32,7 @@ grow_vertical = 2 color = Color(0, 0, 0, 0.588235) -[node name="Control" type="Control" parent="."] +[node name="Root" type="Control" parent="."] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -47,21 +46,21 @@ grow_horizontal = 2 grow_vertical = 2 -[node name="RouletteBg" type="Sprite2D" parent="Control"] +[node name="RouletteBg" type="Sprite2D" parent="Root"] scale = Vector2(4, 4) texture = ExtResource("2_k6gjh") -[node name="WeaponSlotNode" type="Node2D" parent="Control/RouletteBg"] +[node name="WeaponSlotNode" type="Node2D" parent="Root/RouletteBg"] script = ExtResource("3_8v011") -[node name="SlotUi" type="Control" parent="Control/RouletteBg/WeaponSlotNode"] +[node name="SlotUi" type="Control" parent="Root/RouletteBg/WeaponSlotNode"] layout_mode = 3 anchors_preset = 0 offset_left = 65.25 offset_right = 66.25 offset_bottom = 1.0 -[node name="WeaponUi" type="Control" parent="Control/RouletteBg/WeaponSlotNode/SlotUi"] +[node name="WeaponUi" type="Control" parent="Root/RouletteBg/WeaponSlotNode/SlotUi"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -75,10 +74,10 @@ grow_horizontal = 2 grow_vertical = 2 -[node name="WeaponIcon" type="Sprite2D" parent="Control/RouletteBg/WeaponSlotNode/SlotUi/WeaponUi"] +[node name="WeaponIcon" type="Sprite2D" parent="Root/RouletteBg/WeaponSlotNode/SlotUi/WeaponUi"] material = SubResource("ShaderMaterial_i1wmw") -[node name="AmmoLabel" type="Label" parent="Control/RouletteBg/WeaponSlotNode/SlotUi/WeaponUi"] +[node name="AmmoLabel" type="Label" parent="Root/RouletteBg/WeaponSlotNode/SlotUi/WeaponUi"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -96,18 +95,18 @@ horizontal_alignment = 1 vertical_alignment = 1 -[node name="LockSprite" type="Sprite2D" parent="Control/RouletteBg/WeaponSlotNode/SlotUi"] +[node name="LockSprite" type="Sprite2D" parent="Root/RouletteBg/WeaponSlotNode/SlotUi"] scale = Vector2(0.25, 0.25) texture = ExtResource("6_7mog3") -[node name="SlotAreaNode" type="Area2D" parent="Control/RouletteBg/WeaponSlotNode"] +[node name="SlotAreaNode" type="Area2D" parent="Root/RouletteBg/WeaponSlotNode"] collision_layer = 0 collision_mask = 8192 monitorable = false -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Control/RouletteBg/WeaponSlotNode/SlotAreaNode"] +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Root/RouletteBg/WeaponSlotNode/SlotAreaNode"] -[node name="ColorRect" type="ColorRect" parent="Control"] +[node name="UpBar" type="ColorRect" parent="Root"] layout_mode = 0 offset_left = -383.0 offset_top = -480.0 @@ -115,7 +114,7 @@ offset_bottom = -424.0 color = Color(0.184314, 0.184314, 0.184314, 0.784314) -[node name="Label" type="Label" parent="Control/ColorRect"] +[node name="Label" type="Label" parent="Root/UpBar"] layout_mode = 1 anchors_preset = 4 anchor_top = 0.5 @@ -127,7 +126,7 @@ grow_vertical = 2 text = "按Q上一页" -[node name="Label2" type="Label" parent="Control/ColorRect"] +[node name="Label2" type="Label" parent="Root/UpBar"] layout_mode = 1 anchors_preset = 6 anchor_left = 1.0 @@ -142,7 +141,7 @@ grow_vertical = 2 text = "按E下一页" -[node name="PageLabel" type="Label" parent="Control/ColorRect"] +[node name="PageLabel" type="Label" parent="Root/UpBar"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -157,6 +156,29 @@ grow_vertical = 2 text = "1/1" +[node name="DownBar" type="ColorRect" parent="Root"] +layout_mode = 0 +offset_left = -96.0 +offset_top = 435.0 +offset_right = 100.0 +offset_bottom = 491.0 +color = Color(0.184314, 0.184314, 0.184314, 0.784314) + +[node name="Label" type="Label" parent="Root/DownBar"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -84.0 +offset_top = -20.0 +offset_right = 84.0 +offset_bottom = 20.0 +grow_horizontal = 2 +grow_vertical = 2 +text = "按空格丢弃" + [node name="MouseArea" type="Area2D" parent="."] collision_layer = 8192 collision_mask = 0 diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index 9bc8e79..091e957 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -14,6 +14,7 @@ public const string prefab_ui_MapEditor_tscn = "res://prefab/ui/MapEditor.tscn"; public const string prefab_ui_PauseMenu_tscn = "res://prefab/ui/PauseMenu.tscn"; public const string prefab_ui_MapEditorMapMark_tscn = "res://prefab/ui/MapEditorMapMark.tscn"; + public const string prefab_ui_Encyclopedia_tscn = "res://prefab/ui/Encyclopedia.tscn"; public const string prefab_ui_MapEditorCreateMark_tscn = "res://prefab/ui/MapEditorCreateMark.tscn"; public const string prefab_ui_MapEditorCreateRoom_tscn = "res://prefab/ui/MapEditorCreateRoom.tscn"; public const string prefab_ui_EditorImportCombination_tscn = "res://prefab/ui/EditorImportCombination.tscn"; @@ -114,6 +115,7 @@ public const string prefab_item_Item0017_tscn = "res://prefab/item/Item0017.tscn"; public const string prefab_item_Item0056_tscn = "res://prefab/item/Item0056.tscn"; public const string prefab_item_Item0001_tscn = "res://prefab/item/Item0001.tscn"; + public const string prefab_item_Item0026_tscn = "res://prefab/item/Item0026.tscn"; public const string prefab_item_Item0006_tscn = "res://prefab/item/Item0006.tscn"; public const string prefab_item_Item0010_tscn = "res://prefab/item/Item0010.tscn"; public const string prefab_item_Item0011_tscn = "res://prefab/item/Item0011.tscn"; @@ -152,65 +154,6 @@ public const string prefab_currency_GoldTemplate_tscn = "res://prefab/currency/GoldTemplate.tscn"; public const string prefab_currency_Gold10_tscn = "res://prefab/currency/Gold10.tscn"; public const string prefab_currency_Gold5_tscn = "res://prefab/currency/Gold5.tscn"; - public const string build_windows_data_DungeonShooting_windows_x86_64_DungeonShooting_runtimeconfig_json = "res://build/windows/data_DungeonShooting_windows_x86_64/DungeonShooting.runtimeconfig.json"; - public const string build_windows_data_DungeonShooting_windows_x86_64_DungeonShooting_deps_json = "res://build/windows/data_DungeonShooting_windows_x86_64/DungeonShooting.deps.json"; - public const string build_windows_resource_map_tileMaps_GroupConfig_json = "res://build/windows/resource/map/tileMaps/GroupConfig.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle5_Preview_png = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle5/Preview.png"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle5_TileInfo_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle5/TileInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle5_RoomInfo_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle5/RoomInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle5_Preinstall_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle5/Preinstall.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle2_Preview_png = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle2/Preview.png"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle2_TileInfo_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle2/TileInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle2_RoomInfo_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle2/RoomInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle2_Preinstall_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle2/Preinstall.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle3_Preview_png = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle3/Preview.png"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle3_TileInfo_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle3/TileInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle3_RoomInfo_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle3/RoomInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle3_Preinstall_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle3/Preinstall.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle4_Preview_png = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle4/Preview.png"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle4_TileInfo_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle4/TileInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle4_RoomInfo_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle4/RoomInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle4_Preinstall_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle4/Preinstall.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle1_Preview_png = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle1/Preview.png"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle1_TileInfo_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle1/TileInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle1_RoomInfo_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle1/RoomInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle1_Preinstall_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle1/Preinstall.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle6_Preview_png = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle6/Preview.png"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle6_TileInfo_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle6/TileInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle6_RoomInfo_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle6/RoomInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_battle_Battle6_Preinstall_json = "res://build/windows/resource/map/tileMaps/Test1/battle/Battle6/Preinstall.json"; - public const string build_windows_resource_map_tileMaps_Test1_shop_Shop1_Preview_png = "res://build/windows/resource/map/tileMaps/Test1/shop/Shop1/Preview.png"; - public const string build_windows_resource_map_tileMaps_Test1_shop_Shop1_TileInfo_json = "res://build/windows/resource/map/tileMaps/Test1/shop/Shop1/TileInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_shop_Shop1_RoomInfo_json = "res://build/windows/resource/map/tileMaps/Test1/shop/Shop1/RoomInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_shop_Shop1_Preinstall_json = "res://build/windows/resource/map/tileMaps/Test1/shop/Shop1/Preinstall.json"; - public const string build_windows_resource_map_tileMaps_Test1_boss_Boss1_Preview_png = "res://build/windows/resource/map/tileMaps/Test1/boss/Boss1/Preview.png"; - public const string build_windows_resource_map_tileMaps_Test1_boss_Boss1_TileInfo_json = "res://build/windows/resource/map/tileMaps/Test1/boss/Boss1/TileInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_boss_Boss1_RoomInfo_json = "res://build/windows/resource/map/tileMaps/Test1/boss/Boss1/RoomInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_boss_Boss1_Preinstall_json = "res://build/windows/resource/map/tileMaps/Test1/boss/Boss1/Preinstall.json"; - public const string build_windows_resource_map_tileMaps_Test1_outlet_End1_Preview_png = "res://build/windows/resource/map/tileMaps/Test1/outlet/End1/Preview.png"; - public const string build_windows_resource_map_tileMaps_Test1_outlet_End1_TileInfo_json = "res://build/windows/resource/map/tileMaps/Test1/outlet/End1/TileInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_outlet_End1_RoomInfo_json = "res://build/windows/resource/map/tileMaps/Test1/outlet/End1/RoomInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_outlet_End1_Preinstall_json = "res://build/windows/resource/map/tileMaps/Test1/outlet/End1/Preinstall.json"; - public const string build_windows_resource_map_tileMaps_Test1_inlet_Start_Preview_png = "res://build/windows/resource/map/tileMaps/Test1/inlet/Start/Preview.png"; - public const string build_windows_resource_map_tileMaps_Test1_inlet_Start_TileInfo_json = "res://build/windows/resource/map/tileMaps/Test1/inlet/Start/TileInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_inlet_Start_RoomInfo_json = "res://build/windows/resource/map/tileMaps/Test1/inlet/Start/RoomInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_inlet_Start_Preinstall_json = "res://build/windows/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json"; - public const string build_windows_resource_map_tileMaps_Test1_reward_Award1_Preview_png = "res://build/windows/resource/map/tileMaps/Test1/reward/Award1/Preview.png"; - public const string build_windows_resource_map_tileMaps_Test1_reward_Award1_TileInfo_json = "res://build/windows/resource/map/tileMaps/Test1/reward/Award1/TileInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_reward_Award1_RoomInfo_json = "res://build/windows/resource/map/tileMaps/Test1/reward/Award1/RoomInfo.json"; - public const string build_windows_resource_map_tileMaps_Test1_reward_Award1_Preinstall_json = "res://build/windows/resource/map/tileMaps/Test1/reward/Award1/Preinstall.json"; - public const string build_windows_resource_map_tileMaps_test2_battle_1_TileInfo_json = "res://build/windows/resource/map/tileMaps/test2/battle/1/TileInfo.json"; - public const string build_windows_resource_map_tileMaps_test2_battle_1_RoomInfo_json = "res://build/windows/resource/map/tileMaps/test2/battle/1/RoomInfo.json"; - public const string build_windows_resource_map_tileMaps_test2_battle_1_Preinstall_json = "res://build/windows/resource/map/tileMaps/test2/battle/1/Preinstall.json"; - public const string build_windows_resource_map_tileSet_TileSetConfig_json = "res://build/windows/resource/map/tileSet/TileSetConfig.json"; - public const string build_windows_resource_map_tileSet_TileSet2_Main_png = "res://build/windows/resource/map/tileSet/TileSet2/Main.png"; - public const string build_windows_resource_map_tileSet_TileSet2_TileSet_json = "res://build/windows/resource/map/tileSet/TileSet2/TileSet.json"; - public const string build_windows_resource_map_tileSet_TileSet2_Test2_png = "res://build/windows/resource/map/tileSet/TileSet2/Test2.png"; - public const string build_windows_resource_map_tileSet_TileSet1_Main_png = "res://build/windows/resource/map/tileSet/TileSet1/Main.png"; - public const string build_windows_resource_map_tileSet_TileSet1_TileSet_json = "res://build/windows/resource/map/tileSet/TileSet1/TileSet.json"; - public const string build_windows_resource_map_tileSet_TileSet1_Test1_png = "res://build/windows/resource/map/tileSet/TileSet1/Test1.png"; - public const string build_windows_resource_map_tileSet_TileSet1_Test3_png = "res://build/windows/resource/map/tileSet/TileSet1/Test3.png"; - public const string build_windows_resource_map_tileSet_TileSet1_Test2_png = "res://build/windows/resource/map/tileSet/TileSet1/Test2.png"; public const string scene_Main_tscn = "res://scene/Main.tscn"; public const string scene_Hall_tscn = "res://scene/Hall.tscn"; public const string scene_Dungeon_tscn = "res://scene/Dungeon.tscn"; @@ -297,6 +240,7 @@ public const string resource_curve_Curve1_tres = "res://resource/curve/Curve1.tres"; public const string resource_theme_theme1_tres = "res://resource/theme/theme1.tres"; public const string resource_theme_mainTheme_tres = "res://resource/theme/mainTheme.tres"; + public const string resource_sprite_Light_png = "res://resource/sprite/Light.png"; public const string resource_sprite_ui_GUI_png = "res://resource/sprite/ui/GUI.png"; public const string resource_sprite_ui_font_bg_png = "res://resource/sprite/ui/font_bg.png"; public const string resource_sprite_ui_roomMap_MapBar_png = "res://resource/sprite/ui/roomMap/MapBar.png"; @@ -360,6 +304,7 @@ public const string resource_sprite_ui_mapEditorTools_DoorDragButton_down_png = "res://resource/sprite/ui/mapEditorTools/DoorDragButton_down.png"; public const string resource_sprite_ui_mapEditorProject_CellBg_png = "res://resource/sprite/ui/mapEditorProject/CellBg.png"; public const string resource_sprite_ui_keyboard_e_png = "res://resource/sprite/ui/keyboard/e.png"; + public const string resource_sprite_ui_roulette_RouletteBg_png = "res://resource/sprite/ui/roulette/RouletteBg.png"; public const string resource_sprite_prop_buff_BuffProp0003_png = "res://resource/sprite/prop/buff/BuffProp0003.png"; public const string resource_sprite_prop_buff_BuffProp0002_png = "res://resource/sprite/prop/buff/BuffProp0002.png"; public const string resource_sprite_prop_buff_BuffProp0014_png = "res://resource/sprite/prop/buff/BuffProp0014.png"; @@ -574,46 +519,47 @@ public const string resource_sprite_item_hall_a_Slice_28_png = "res://resource/sprite/item/hall_a/Slice_28.png"; public const string resource_sprite_item_hall_a_Slice_49_png = "res://resource/sprite/item/hall_a/Slice_49.png"; public const string resource_sprite_item_hall_a_Slice_48_png = "res://resource/sprite/item/hall_a/Slice_48.png"; - public const string resource_sprite_item_hall_b_huapen_png = "res://resource/sprite/item/hall_b/huapen.png"; - public const string resource_sprite_item_hall_b_shuihu_png = "res://resource/sprite/item/hall_b/shuihu.png"; - public const string resource_sprite_item_hall_b_jieshouqi_png = "res://resource/sprite/item/hall_b/jieshouqi.png"; - public const string resource_sprite_item_hall_b_ditan_png = "res://resource/sprite/item/hall_b/ditan.png"; - public const string resource_sprite_item_hall_b_传送带_png = "res://resource/sprite/item/hall_b/传送带.png"; - public const string resource_sprite_item_hall_b_saoba_png = "res://resource/sprite/item/hall_b/saoba.png"; - public const string resource_sprite_item_hall_b_bingxiang01_png = "res://resource/sprite/item/hall_b/bingxiang01.png"; - public const string resource_sprite_item_hall_b_zhishi_png = "res://resource/sprite/item/hall_b/zhishi.png"; - public const string resource_sprite_item_hall_b_wall1_png = "res://resource/sprite/item/hall_b/wall1.png"; - public const string resource_sprite_item_hall_b_wall3_png = "res://resource/sprite/item/hall_b/wall3.png"; - public const string resource_sprite_item_hall_b_ditan01_png = "res://resource/sprite/item/hall_b/ditan01.png"; - public const string resource_sprite_item_hall_b_wall2_png = "res://resource/sprite/item/hall_b/wall2.png"; - public const string resource_sprite_item_hall_b_fuhuo_png = "res://resource/sprite/item/hall_b/fuhuo.png"; - public const string resource_sprite_item_hall_b_kouzi_png = "res://resource/sprite/item/hall_b/kouzi.png"; - public const string resource_sprite_item_hall_b_pingmu_png = "res://resource/sprite/item/hall_b/pingmu.png"; - public const string resource_sprite_item_hall_b_shuiguan02_png = "res://resource/sprite/item/hall_b/shuiguan02.png"; - public const string resource_sprite_item_hall_b_shuiguan01_png = "res://resource/sprite/item/hall_b/shuiguan01.png"; - public const string resource_sprite_item_hall_b_mao_png = "res://resource/sprite/item/hall_b/mao.png"; - public const string resource_sprite_item_hall_b_mugui_png = "res://resource/sprite/item/hall_b/mugui.png"; - public const string resource_sprite_item_hall_b_zhuozi01_png = "res://resource/sprite/item/hall_b/zhuozi01.png"; - public const string resource_sprite_item_hall_b_传送带图标_png = "res://resource/sprite/item/hall_b/传送带图标.png"; - public const string resource_sprite_item_hall_b_yuguang_png = "res://resource/sprite/item/hall_b/yuguang.png"; - public const string resource_sprite_item_hall_b_椅子_png = "res://resource/sprite/item/hall_b/椅子.png"; - public const string resource_sprite_item_hall_b_zhuozi02_png = "res://resource/sprite/item/hall_b/zhuozi02.png"; - public const string resource_sprite_item_hall_b_xiangzi_png = "res://resource/sprite/item/hall_b/xiangzi.png"; - public const string resource_sprite_item_hall_b_huatan_png = "res://resource/sprite/item/hall_b/huatan.png"; - public const string resource_sprite_item_hall_b_baoxiangui_png = "res://resource/sprite/item/hall_b/baoxiangui.png"; - public const string resource_sprite_item_hall_b_shuimu_png = "res://resource/sprite/item/hall_b/shuimu.png"; - public const string resource_sprite_item_hall_b_huatan02_png = "res://resource/sprite/item/hall_b/huatan02.png"; - public const string resource_sprite_item_hall_b_dimian3_png = "res://resource/sprite/item/hall_b/dimian3.png"; - public const string resource_sprite_item_hall_b_fengjing_png = "res://resource/sprite/item/hall_b/fengjing.png"; - public const string resource_sprite_item_hall_b_dimian2_png = "res://resource/sprite/item/hall_b/dimian2.png"; - public const string resource_sprite_item_hall_b_dimian_png = "res://resource/sprite/item/hall_b/dimian.png"; - public const string resource_sprite_item_hall_b_chuanlian_png = "res://resource/sprite/item/hall_b/chuanlian.png"; - public const string resource_sprite_item_hall_b_玻璃块_png = "res://resource/sprite/item/hall_b/玻璃块.png"; - public const string resource_sprite_item_hall_b_dimian4_png = "res://resource/sprite/item/hall_b/dimian4.png"; + public const string resource_sprite_item_hall_b_item11_png = "res://resource/sprite/item/hall_b/item-11.png"; + public const string resource_sprite_item_hall_b_item05_png = "res://resource/sprite/item/hall_b/item-05.png"; + public const string resource_sprite_item_hall_b_item010_png = "res://resource/sprite/item/hall_b/item-010.png"; + public const string resource_sprite_item_hall_b_item04_png = "res://resource/sprite/item/hall_b/item-04.png"; + public const string resource_sprite_item_hall_b_item06_png = "res://resource/sprite/item/hall_b/item-06.png"; + public const string resource_sprite_item_hall_b_item12_png = "res://resource/sprite/item/hall_b/item-12.png"; + public const string resource_sprite_item_hall_b_item13_png = "res://resource/sprite/item/hall_b/item-13.png"; + public const string resource_sprite_item_hall_b_item07_png = "res://resource/sprite/item/hall_b/item-07.png"; + public const string resource_sprite_item_hall_b_item03_png = "res://resource/sprite/item/hall_b/item-03.png"; + public const string resource_sprite_item_hall_b_item17_png = "res://resource/sprite/item/hall_b/item-17.png"; + public const string resource_sprite_item_hall_b_item16_png = "res://resource/sprite/item/hall_b/item-16.png"; + public const string resource_sprite_item_hall_b_item02_png = "res://resource/sprite/item/hall_b/item-02.png"; + public const string resource_sprite_item_hall_b_item28_png = "res://resource/sprite/item/hall_b/item-28.png"; + public const string resource_sprite_item_hall_b_item14_png = "res://resource/sprite/item/hall_b/item-14.png"; + public const string resource_sprite_item_hall_b_item01_png = "res://resource/sprite/item/hall_b/item-01.png"; + public const string resource_sprite_item_hall_b_item15_png = "res://resource/sprite/item/hall_b/item-15.png"; + public const string resource_sprite_item_hall_b_item29_png = "res://resource/sprite/item/hall_b/item-29.png"; + public const string resource_sprite_item_hall_b_item30_png = "res://resource/sprite/item/hall_b/item-30.png"; + public const string resource_sprite_item_hall_b_item24_png = "res://resource/sprite/item/hall_b/item-24.png"; + public const string resource_sprite_item_hall_b_item18_png = "res://resource/sprite/item/hall_b/item-18.png"; + public const string resource_sprite_item_hall_b_item19_png = "res://resource/sprite/item/hall_b/item-19.png"; + public const string resource_sprite_item_hall_b_item25_png = "res://resource/sprite/item/hall_b/item-25.png"; + public const string resource_sprite_item_hall_b_item31_png = "res://resource/sprite/item/hall_b/item-31.png"; + public const string resource_sprite_item_hall_b_item27_png = "res://resource/sprite/item/hall_b/item-27.png"; + public const string resource_sprite_item_hall_b_item33_png = "res://resource/sprite/item/hall_b/item-33.png"; + public const string resource_sprite_item_hall_b_item32_png = "res://resource/sprite/item/hall_b/item-32.png"; + public const string resource_sprite_item_hall_b_item26_png = "res://resource/sprite/item/hall_b/item-26.png"; + public const string resource_sprite_item_hall_b_item22_png = "res://resource/sprite/item/hall_b/item-22.png"; + public const string resource_sprite_item_hall_b_item36_png = "res://resource/sprite/item/hall_b/item-36.png"; + public const string resource_sprite_item_hall_b_item23_png = "res://resource/sprite/item/hall_b/item-23.png"; + public const string resource_sprite_item_hall_b_item09_png = "res://resource/sprite/item/hall_b/item-09.png"; + public const string resource_sprite_item_hall_b_item35_png = "res://resource/sprite/item/hall_b/item-35.png"; + public const string resource_sprite_item_hall_b_item21_png = "res://resource/sprite/item/hall_b/item-21.png"; + public const string resource_sprite_item_hall_b_item20_png = "res://resource/sprite/item/hall_b/item-20.png"; + public const string resource_sprite_item_hall_b_item34_png = "res://resource/sprite/item/hall_b/item-34.png"; + public const string resource_sprite_item_hall_b_item08_png = "res://resource/sprite/item/hall_b/item-08.png"; public const string resource_sprite_item_hall_c_item_99_png = "res://resource/sprite/item/hall_c/item _99.png"; public const string resource_sprite_item_hall_c_item_58_png = "res://resource/sprite/item/hall_c/item _58.png"; public const string resource_sprite_item_hall_c_item_59_png = "res://resource/sprite/item/hall_c/item _59.png"; public const string resource_sprite_item_hall_c_item_49_png = "res://resource/sprite/item/hall_c/item _49.png"; + public const string resource_sprite_item_hall_c_Slice_41_png = "res://resource/sprite/item/hall_c/Slice_41.png"; public const string resource_sprite_item_hall_c_item_48_png = "res://resource/sprite/item/hall_c/item _48.png"; public const string resource_sprite_item_hall_c_item_04_png = "res://resource/sprite/item/hall_c/item _04.png"; public const string resource_sprite_item_hall_c_item_10_png = "res://resource/sprite/item/hall_c/item _10.png"; diff --git a/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs b/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs index 6b450e8..64a0079 100644 --- a/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs +++ b/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs @@ -12,6 +12,7 @@ public const string MapEditor = "MapEditor"; public const string PauseMenu = "PauseMenu"; public const string MapEditorMapMark = "MapEditorMapMark"; + public const string Encyclopedia = "Encyclopedia"; public const string MapEditorCreateMark = "MapEditorCreateMark"; public const string MapEditorCreateRoom = "MapEditorCreateRoom"; public const string EditorImportCombination = "EditorImportCombination"; @@ -380,6 +381,54 @@ } /// + /// 创建 Encyclopedia, 并返回UI实例, 该函数不会打开 Ui + /// + public static UI.Encyclopedia.EncyclopediaPanel Create_Encyclopedia() + { + return CreateUi(UiNames.Encyclopedia); + } + + /// + /// 打开 Encyclopedia, 并返回UI实例 + /// + public static UI.Encyclopedia.EncyclopediaPanel Open_Encyclopedia() + { + return OpenUi(UiNames.Encyclopedia); + } + + /// + /// 隐藏 Encyclopedia 的所有实例 + /// + public static void Hide_Encyclopedia() + { + var uiInstance = Get_Encyclopedia_Instance(); + foreach (var uiPanel in uiInstance) + { + uiPanel.HideUi(); + } + } + + /// + /// 销毁 Encyclopedia 的所有实例 + /// + public static void Destroy_Encyclopedia() + { + var uiInstance = Get_Encyclopedia_Instance(); + foreach (var uiPanel in uiInstance) + { + uiPanel.Destroy(); + } + } + + /// + /// 获取所有 Encyclopedia 的实例, 如果没有实例, 则返回一个空数组 + /// + public static UI.Encyclopedia.EncyclopediaPanel[] Get_Encyclopedia_Instance() + { + return GetUiInstance(nameof(UI.Encyclopedia.Encyclopedia)); + } + + /// /// 创建 MapEditorCreateMark, 并返回UI实例, 该函数不会打开 Ui /// public static UI.MapEditorCreateMark.MapEditorCreateMarkPanel Create_MapEditorCreateMark() diff --git a/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs b/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs index 443f5d1..c63e847 100644 --- a/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs @@ -319,15 +319,17 @@ /// private void OpenExportExcelFolder() { - var path = Environment.CurrentDirectory + "/excel"; var osName = OS.GetName(); - GD.Print("打开excel文件夹: " + path); if (osName == "Windows") { + var path = Environment.CurrentDirectory + "\\excel"; + GD.Print("打开excel文件夹: " + path); System.Diagnostics.Process.Start("explorer.exe", path); } else { + var path = Environment.CurrentDirectory + "/excel"; + GD.Print("打开excel文件夹: " + path); System.Diagnostics.Process.Start("open", path); } } diff --git a/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs b/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs new file mode 100644 index 0000000..806f085 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs @@ -0,0 +1,333 @@ +namespace UI.Encyclopedia; + +/// +/// Ui代码, 该类是根据ui场景自动生成的, 请不要手动编辑该类, 以免造成代码丢失 +/// +public abstract partial class Encyclopedia : UiBase +{ + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2 + /// + public Panel2 L_Panel2 + { + get + { + if (_L_Panel2 == null) _L_Panel2 = new Panel2((EncyclopediaPanel)this, GetNode("Panel2")); + return _L_Panel2; + } + } + private Panel2 _L_Panel2; + + + public Encyclopedia() : base(nameof(Encyclopedia)) + { + } + + public sealed override void OnInitNestedUi() + { + + } + + /// + /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.HBoxContainer.LineEdit + /// + public class LineEdit : UiNode + { + public LineEdit(EncyclopediaPanel uiPanel, Godot.LineEdit node) : base(uiPanel, node) { } + public override LineEdit Clone() => new (UiPanel, (Godot.LineEdit)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.HBoxContainer.Search + /// + public class Search : UiNode + { + public Search(EncyclopediaPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Search Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.HBoxContainer + /// + public class HBoxContainer : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.LineEdit + /// + public LineEdit L_LineEdit + { + get + { + if (_L_LineEdit == null) _L_LineEdit = new LineEdit(UiPanel, Instance.GetNode("LineEdit")); + return _L_LineEdit; + } + } + private LineEdit _L_LineEdit; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.Search + /// + public Search L_Search + { + get + { + if (_L_Search == null) _L_Search = new Search(UiPanel, Instance.GetNode("Search")); + return _L_Search; + } + } + private Search _L_Search; + + public HBoxContainer(EncyclopediaPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override HBoxContainer Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer + /// + public class MarginContainer_1 : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.HBoxContainer + /// + public HBoxContainer L_HBoxContainer + { + get + { + if (_L_HBoxContainer == null) _L_HBoxContainer = new HBoxContainer(UiPanel, Instance.GetNode("HBoxContainer")); + return _L_HBoxContainer; + } + } + private HBoxContainer _L_HBoxContainer; + + public MarginContainer_1(EncyclopediaPanel uiPanel, Godot.MarginContainer node) : base(uiPanel, node) { } + public override MarginContainer_1 Clone() => new (UiPanel, (Godot.MarginContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton.PreviewImage + /// + public class PreviewImage : UiNode + { + public PreviewImage(EncyclopediaPanel uiPanel, Godot.TextureRect node) : base(uiPanel, node) { } + public override PreviewImage Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton.ObjectName + /// + public class ObjectName : UiNode + { + public ObjectName(EncyclopediaPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override ObjectName Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton.Select + /// + public class Select : UiNode + { + public Select(EncyclopediaPanel uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { } + public override Select Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton + /// + public class ObjectButton : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.PreviewImage + /// + public PreviewImage L_PreviewImage + { + get + { + if (_L_PreviewImage == null) _L_PreviewImage = new PreviewImage(UiPanel, Instance.GetNode("PreviewImage")); + return _L_PreviewImage; + } + } + private PreviewImage _L_PreviewImage; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectName + /// + public ObjectName L_ObjectName + { + get + { + if (_L_ObjectName == null) _L_ObjectName = new ObjectName(UiPanel, Instance.GetNode("ObjectName")); + return _L_ObjectName; + } + } + private ObjectName _L_ObjectName; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.Select + /// + public Select L_Select + { + get + { + if (_L_Select == null) _L_Select = new Select(UiPanel, Instance.GetNode("Select")); + return _L_Select; + } + } + private Select _L_Select; + + public ObjectButton(EncyclopediaPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override ObjectButton Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer + /// + public class ScrollContainer : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ObjectButton + /// + public ObjectButton L_ObjectButton + { + get + { + if (_L_ObjectButton == null) _L_ObjectButton = new ObjectButton(UiPanel, Instance.GetNode("ObjectButton")); + return _L_ObjectButton; + } + } + private ObjectButton _L_ObjectButton; + + public ScrollContainer(EncyclopediaPanel uiPanel, Godot.ScrollContainer node) : base(uiPanel, node) { } + public override ScrollContainer Clone() => new (UiPanel, (Godot.ScrollContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2 + /// + public class VBoxContainer2 : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.MarginContainer + /// + public MarginContainer_1 L_MarginContainer + { + get + { + if (_L_MarginContainer == null) _L_MarginContainer = new MarginContainer_1(UiPanel, Instance.GetNode("MarginContainer")); + return _L_MarginContainer; + } + } + private MarginContainer_1 _L_MarginContainer; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.ScrollContainer + /// + public ScrollContainer L_ScrollContainer + { + get + { + if (_L_ScrollContainer == null) _L_ScrollContainer = new ScrollContainer(UiPanel, Instance.GetNode("ScrollContainer")); + return _L_ScrollContainer; + } + } + private ScrollContainer _L_ScrollContainer; + + public VBoxContainer2(EncyclopediaPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } + public override VBoxContainer2 Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer + /// + public class MarginContainer : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.VBoxContainer2 + /// + public VBoxContainer2 L_VBoxContainer2 + { + get + { + if (_L_VBoxContainer2 == null) _L_VBoxContainer2 = new VBoxContainer2(UiPanel, Instance.GetNode("VBoxContainer2")); + return _L_VBoxContainer2; + } + } + private VBoxContainer2 _L_VBoxContainer2; + + public MarginContainer(EncyclopediaPanel uiPanel, Godot.MarginContainer node) : base(uiPanel, node) { } + public override MarginContainer Clone() => new (UiPanel, (Godot.MarginContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.Panel2 + /// + public class Panel2 : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.MarginContainer + /// + public MarginContainer L_MarginContainer + { + get + { + if (_L_MarginContainer == null) _L_MarginContainer = new MarginContainer(UiPanel, Instance.GetNode("MarginContainer")); + return _L_MarginContainer; + } + } + private MarginContainer _L_MarginContainer; + + public Panel2(EncyclopediaPanel uiPanel, Godot.Panel node) : base(uiPanel, node) { } + public override Panel2 Clone() => new (UiPanel, (Godot.Panel)Instance.Duplicate()); + } + + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.HBoxContainer.LineEdit + /// + public LineEdit S_LineEdit => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_MarginContainer.L_HBoxContainer.L_LineEdit; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.HBoxContainer.Search + /// + public Search S_Search => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_MarginContainer.L_HBoxContainer.L_Search; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.HBoxContainer + /// + public HBoxContainer S_HBoxContainer => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_MarginContainer.L_HBoxContainer; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton.PreviewImage + /// + public PreviewImage S_PreviewImage => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_ScrollContainer.L_ObjectButton.L_PreviewImage; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton.ObjectName + /// + public ObjectName S_ObjectName => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_ScrollContainer.L_ObjectButton.L_ObjectName; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton.Select + /// + public Select S_Select => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_ScrollContainer.L_ObjectButton.L_Select; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton + /// + public ObjectButton S_ObjectButton => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_ScrollContainer.L_ObjectButton; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer + /// + public ScrollContainer S_ScrollContainer => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_ScrollContainer; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2 + /// + public VBoxContainer2 S_VBoxContainer2 => L_Panel2.L_MarginContainer.L_VBoxContainer2; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2 + /// + public Panel2 S_Panel2 => L_Panel2; + +} diff --git a/DungeonShooting_Godot/src/game/ui/encyclopedia/EncyclopediaPanel.cs b/DungeonShooting_Godot/src/game/ui/encyclopedia/EncyclopediaPanel.cs new file mode 100644 index 0000000..06c3005 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/encyclopedia/EncyclopediaPanel.cs @@ -0,0 +1,18 @@ +using Godot; + +namespace UI.Encyclopedia; + +public partial class EncyclopediaPanel : Encyclopedia +{ + + public override void OnCreateUi() + { + + } + + public override void OnDestroyUi() + { + + } + +} diff --git a/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenu.cs b/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenu.cs index 256a892..09c74de 100644 --- a/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenu.cs +++ b/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenu.cs @@ -69,6 +69,24 @@ } /// + /// 类型: , 路径: PauseMenu.VBoxContainer.Encyclopedia + /// + public class Encyclopedia : UiNode + { + public Encyclopedia(PauseMenuPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Encyclopedia Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: PauseMenu.VBoxContainer.Setting + /// + public class Setting : UiNode + { + public Setting(PauseMenuPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Setting Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// /// 类型: , 路径: PauseMenu.VBoxContainer.Exit /// public class Exit : UiNode @@ -109,6 +127,32 @@ private Restart _L_Restart; /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: PauseMenu.Encyclopedia + /// + public Encyclopedia L_Encyclopedia + { + get + { + if (_L_Encyclopedia == null) _L_Encyclopedia = new Encyclopedia(UiPanel, Instance.GetNode("Encyclopedia")); + return _L_Encyclopedia; + } + } + private Encyclopedia _L_Encyclopedia; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: PauseMenu.Setting + /// + public Setting L_Setting + { + get + { + if (_L_Setting == null) _L_Setting = new Setting(UiPanel, Instance.GetNode("Setting")); + return _L_Setting; + } + } + private Setting _L_Setting; + + /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: PauseMenu.Exit /// public Exit L_Exit @@ -142,6 +186,16 @@ public Restart S_Restart => L_VBoxContainer.L_Restart; /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: PauseMenu.VBoxContainer.Encyclopedia + /// + public Encyclopedia S_Encyclopedia => L_VBoxContainer.L_Encyclopedia; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: PauseMenu.VBoxContainer.Setting + /// + public Setting S_Setting => L_VBoxContainer.L_Setting; + + /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: PauseMenu.VBoxContainer.Exit /// public Exit S_Exit => L_VBoxContainer.L_Exit; diff --git a/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs b/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs index 2a78dc0..0328541 100644 --- a/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs @@ -8,6 +8,8 @@ public override void OnCreateUi() { S_Continue.Instance.Pressed += OnContinueClick; + S_Setting.Instance.Pressed += OnSettingClick; + S_Encyclopedia.Instance.Pressed += OnEncyclopediaClick; S_Restart.Instance.Pressed += OnRestartClick; S_Exit.Instance.Pressed += OnExitClick; @@ -41,6 +43,18 @@ Destroy(); } + //设置 + private void OnSettingClick() + { + OpenNextUi(UiManager.UiNames.Setting); + } + + //图鉴 + private void OnEncyclopediaClick() + { + OpenNextUi(UiManager.UiNames.Encyclopedia); + } + //重新开始 private void OnRestartClick() { diff --git a/DungeonShooting_Godot/src/game/ui/weaponRoulette/WeaponRoulette.cs b/DungeonShooting_Godot/src/game/ui/weaponRoulette/WeaponRoulette.cs index b903858..decea72 100644 --- a/DungeonShooting_Godot/src/game/ui/weaponRoulette/WeaponRoulette.cs +++ b/DungeonShooting_Godot/src/game/ui/weaponRoulette/WeaponRoulette.cs @@ -19,17 +19,17 @@ private Bg _L_Bg; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Control + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root /// - public Control L_Control + public Root L_Root { get { - if (_L_Control == null) _L_Control = new Control((WeaponRoulettePanel)this, GetNode("Control")); - return _L_Control; + if (_L_Root == null) _L_Root = new Root((WeaponRoulettePanel)this, GetNode("Root")); + return _L_Root; } } - private Control _L_Control; + private Root _L_Root; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.MouseArea @@ -51,7 +51,6 @@ public sealed override void OnInitNestedUi() { - _ = L_Control.L_RouletteBg.L_WeaponSlotNode; } @@ -65,7 +64,7 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.WeaponIcon + /// 类型: , 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.WeaponIcon /// public class WeaponIcon : UiNode { @@ -74,7 +73,7 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.AmmoLabel + /// 类型: , 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.AmmoLabel /// public class AmmoLabel : UiNode { @@ -83,12 +82,12 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi + /// 类型: , 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi /// public class WeaponUi : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponIcon + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponIcon /// public WeaponIcon L_WeaponIcon { @@ -101,7 +100,7 @@ private WeaponIcon _L_WeaponIcon; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.AmmoLabel + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.AmmoLabel /// public AmmoLabel L_AmmoLabel { @@ -118,7 +117,7 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.LockSprite + /// 类型: , 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.LockSprite /// public class LockSprite : UiNode { @@ -127,12 +126,12 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi + /// 类型: , 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi /// public class SlotUi : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.WeaponUi + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.WeaponUi /// public WeaponUi L_WeaponUi { @@ -145,7 +144,7 @@ private WeaponUi _L_WeaponUi; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.LockSprite + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.LockSprite /// public LockSprite L_LockSprite { @@ -162,7 +161,7 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotAreaNode.CollisionPolygon2D + /// 类型: , 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotAreaNode.CollisionPolygon2D /// public class CollisionPolygon2D : UiNode { @@ -171,12 +170,12 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotAreaNode + /// 类型: , 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotAreaNode /// public class SlotAreaNode : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.CollisionPolygon2D + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.CollisionPolygon2D /// public CollisionPolygon2D L_CollisionPolygon2D { @@ -193,12 +192,12 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode + /// 类型: , 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode /// public class WeaponSlotNode : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.SlotUi + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.SlotUi /// public SlotUi L_SlotUi { @@ -211,7 +210,7 @@ private SlotUi _L_SlotUi; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.SlotAreaNode + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.SlotAreaNode /// public SlotAreaNode L_SlotAreaNode { @@ -228,12 +227,12 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.RouletteBg + /// 类型: , 路径: WeaponRoulette.Root.RouletteBg /// public class RouletteBg : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Control.WeaponSlotNode + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root.WeaponSlotNode /// public WeaponSlotNode L_WeaponSlotNode { @@ -250,7 +249,7 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.ColorRect.Label + /// 类型: , 路径: WeaponRoulette.Root.UpBar.Label /// public class Label : UiNode { @@ -259,7 +258,7 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.ColorRect.Label2 + /// 类型: , 路径: WeaponRoulette.Root.UpBar.Label2 /// public class Label2 : UiNode { @@ -268,7 +267,7 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.ColorRect.PageLabel + /// 类型: , 路径: WeaponRoulette.Root.UpBar.PageLabel /// public class PageLabel : UiNode { @@ -277,12 +276,12 @@ } /// - /// 类型: , 路径: WeaponRoulette.Control.ColorRect + /// 类型: , 路径: WeaponRoulette.Root.UpBar /// - public class ColorRect : UiNode + public class UpBar : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Control.Label + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root.Label /// public Label L_Label { @@ -295,7 +294,7 @@ private Label _L_Label; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Control.Label2 + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root.Label2 /// public Label2 L_Label2 { @@ -308,7 +307,7 @@ private Label2 _L_Label2; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Control.PageLabel + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root.PageLabel /// public PageLabel L_PageLabel { @@ -320,14 +319,45 @@ } private PageLabel _L_PageLabel; - public ColorRect(WeaponRoulettePanel uiPanel, Godot.ColorRect node) : base(uiPanel, node) { } - public override ColorRect Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate()); + public UpBar(WeaponRoulettePanel uiPanel, Godot.ColorRect node) : base(uiPanel, node) { } + public override UpBar Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate()); } /// - /// 类型: , 路径: WeaponRoulette.Control + /// 类型: , 路径: WeaponRoulette.Root.DownBar.Label /// - public class Control : UiNode + public class Label_1 : UiNode + { + public Label_1(WeaponRoulettePanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Label_1 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: WeaponRoulette.Root.DownBar + /// + public class DownBar : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.Root.Label + /// + public Label_1 L_Label + { + get + { + if (_L_Label == null) _L_Label = new Label_1(UiPanel, Instance.GetNode("Label")); + return _L_Label; + } + } + private Label_1 _L_Label; + + public DownBar(WeaponRoulettePanel uiPanel, Godot.ColorRect node) : base(uiPanel, node) { } + public override DownBar Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: WeaponRoulette.Root + /// + public class Root : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.RouletteBg @@ -343,20 +373,33 @@ private RouletteBg _L_RouletteBg; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.ColorRect + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.UpBar /// - public ColorRect L_ColorRect + public UpBar L_UpBar { get { - if (_L_ColorRect == null) _L_ColorRect = new ColorRect(UiPanel, Instance.GetNode("ColorRect")); - return _L_ColorRect; + if (_L_UpBar == null) _L_UpBar = new UpBar(UiPanel, Instance.GetNode("UpBar")); + return _L_UpBar; } } - private ColorRect _L_ColorRect; + private UpBar _L_UpBar; - public Control(WeaponRoulettePanel uiPanel, Godot.Control node) : base(uiPanel, node) { } - public override Control Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate()); + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: WeaponRoulette.DownBar + /// + public DownBar L_DownBar + { + get + { + if (_L_DownBar == null) _L_DownBar = new DownBar(UiPanel, Instance.GetNode("DownBar")); + return _L_DownBar; + } + } + private DownBar _L_DownBar; + + public Root(WeaponRoulettePanel uiPanel, Godot.Control node) : base(uiPanel, node) { } + public override Root Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate()); } /// @@ -397,74 +440,74 @@ public Bg S_Bg => L_Bg; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.WeaponIcon + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.WeaponIcon /// - public WeaponIcon S_WeaponIcon => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_WeaponUi.L_WeaponIcon; + public WeaponIcon S_WeaponIcon => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_WeaponUi.L_WeaponIcon; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.AmmoLabel + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.AmmoLabel /// - public AmmoLabel S_AmmoLabel => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_WeaponUi.L_AmmoLabel; + public AmmoLabel S_AmmoLabel => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_WeaponUi.L_AmmoLabel; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi /// - public WeaponUi S_WeaponUi => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_WeaponUi; + public WeaponUi S_WeaponUi => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_WeaponUi; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.LockSprite + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.LockSprite /// - public LockSprite S_LockSprite => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_LockSprite; + public LockSprite S_LockSprite => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_LockSprite; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi /// - public SlotUi S_SlotUi => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotUi; + public SlotUi S_SlotUi => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotUi; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotAreaNode.CollisionPolygon2D + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotAreaNode.CollisionPolygon2D /// - public CollisionPolygon2D S_CollisionPolygon2D => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotAreaNode.L_CollisionPolygon2D; + public CollisionPolygon2D S_CollisionPolygon2D => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotAreaNode.L_CollisionPolygon2D; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotAreaNode + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotAreaNode /// - public SlotAreaNode S_SlotAreaNode => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotAreaNode; + public SlotAreaNode S_SlotAreaNode => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotAreaNode; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode /// - public WeaponSlotNode S_WeaponSlotNode => L_Control.L_RouletteBg.L_WeaponSlotNode; + public WeaponSlotNode S_WeaponSlotNode => L_Root.L_RouletteBg.L_WeaponSlotNode; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.RouletteBg + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.RouletteBg /// - public RouletteBg S_RouletteBg => L_Control.L_RouletteBg; + public RouletteBg S_RouletteBg => L_Root.L_RouletteBg; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.ColorRect.Label + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.UpBar.Label2 /// - public Label S_Label => L_Control.L_ColorRect.L_Label; + public Label2 S_Label2 => L_Root.L_UpBar.L_Label2; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.ColorRect.Label2 + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.UpBar.PageLabel /// - public Label2 S_Label2 => L_Control.L_ColorRect.L_Label2; + public PageLabel S_PageLabel => L_Root.L_UpBar.L_PageLabel; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.ColorRect.PageLabel + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.UpBar /// - public PageLabel S_PageLabel => L_Control.L_ColorRect.L_PageLabel; + public UpBar S_UpBar => L_Root.L_UpBar; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control.ColorRect + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root.DownBar /// - public ColorRect S_ColorRect => L_Control.L_ColorRect; + public DownBar S_DownBar => L_Root.L_DownBar; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Control + /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.Root /// - public Control S_Control => L_Control; + public Root S_Root => L_Root; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: WeaponRoulette.MouseArea.CollisionShape2D diff --git a/DungeonShooting_Godot/src/game/ui/weaponRoulette/WeaponRoulettePanel.cs b/DungeonShooting_Godot/src/game/ui/weaponRoulette/WeaponRoulettePanel.cs index a910eeb..1b03c06 100644 --- a/DungeonShooting_Godot/src/game/ui/weaponRoulette/WeaponRoulettePanel.cs +++ b/DungeonShooting_Godot/src/game/ui/weaponRoulette/WeaponRoulettePanel.cs @@ -31,7 +31,7 @@ public override void OnCreateUi() { - L_Control.Instance.Visible = false; + S_Root.Instance.Visible = false; S_Bg.Instance.Visible = false; //创建武器插槽 @@ -84,31 +84,46 @@ { S_MouseArea.Instance.GlobalPosition = GetGlobalMousePosition(); - if (_maxPageIndex > 0) + //扔掉武器 + if (ActiveWeapon != null && InputManager.MeleeAttack) { - if (InputManager.ExchangeWeapon) //上一页 + ActiveWeapon.Master.ThrowWeapon(ActiveWeapon.PackageIndex); + ActiveWeapon = null; + RefreshWeapon(); + } + else + { + //上一页/下一页 + if (_maxPageIndex > 0) { - _pageIndex--; - if (_pageIndex < 0) + if (InputManager.ExchangeWeapon) //上一页 { - _pageIndex = _maxPageIndex; - } + _pageIndex--; + if (_pageIndex < 0) + { + _pageIndex = _maxPageIndex; + } - RefreshPageLabel(); - RefreshWeapon(); - } - else if (InputManager.Interactive) //下一页 - { - _pageIndex++; - if (_pageIndex > _maxPageIndex) + RefreshPageLabel(); + RefreshWeapon(); + } + else if (InputManager.Interactive) //下一页 { - _pageIndex = 0; - } + _pageIndex++; + if (_pageIndex > _maxPageIndex) + { + _pageIndex = 0; + } - RefreshPageLabel(); - RefreshWeapon(); + RefreshPageLabel(); + RefreshWeapon(); + } } } + + + //扔掉武器提示 + S_DownBar.Instance.Visible = ActiveWeapon != null; } else { @@ -123,7 +138,7 @@ _pressRouletteFlag = true; _isMagnifyRoulette = true; - L_Control.Instance.Visible = true; + S_Root.Instance.Visible = true; S_Bg.Instance.Visible = true; SetEnableSectorCollision(true); RefreshSlotPage(); @@ -134,7 +149,7 @@ //关闭轮盘 private void ShrinkRoulette() { - L_Control.Instance.Visible = false; + S_Root.Instance.Visible = false; S_Bg.Instance.Visible = false; _isMagnifyRoulette = false; @@ -185,7 +200,7 @@ } } _maxPageIndex = Mathf.CeilToInt((lastIndex + 1f) / SlotCount) - 1; - S_ColorRect.Instance.Visible = _maxPageIndex > 0; + S_UpBar.Instance.Visible = _maxPageIndex > 0; if (_pageIndex > _maxPageIndex) { diff --git a/DungeonShooting_Godot/src/game/ui/weaponRoulette/WeaponSlot.cs b/DungeonShooting_Godot/src/game/ui/weaponRoulette/WeaponSlot.cs index 976a0b2..80f3c51 100644 --- a/DungeonShooting_Godot/src/game/ui/weaponRoulette/WeaponSlot.cs +++ b/DungeonShooting_Godot/src/game/ui/weaponRoulette/WeaponSlot.cs @@ -37,6 +37,11 @@ private void OnAreaExited(Area2D other) { + if (_node.UiPanel.ActiveWeapon == _weapon) + { + _node.UiPanel.ActiveWeapon = null; + } + _node.Instance.Scale = Vector2.One; _node.L_SlotUi.L_WeaponUi.L_WeaponIcon.Instance.Material.SetShaderMaterialParameter(ShaderParamNames.OutlineColor, Colors.Black); }