diff --git a/prefab/entitys/Character.tscn b/prefab/entitys/Character.tscn index f61d783..0ab5716 100644 --- a/prefab/entitys/Character.tscn +++ b/prefab/entitys/Character.tscn @@ -29,12 +29,8 @@ collision_mask = 162 platform_floor_layers = 4294967042 platform_wall_layers = 128 script = ExtResource("1_1dlls") -CharacterName = null -CanMutateAfterDeath = null -_initialHp = null MaxHp = 32 CampId = "Default" -LootListId = null [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CapsuleShape2D_bb8wt") diff --git a/prefab/roomTemplates/dungeon/horizontalCorridorWithSewer.tscn b/prefab/roomTemplates/dungeon/horizontalCorridorWithSewer.tscn index b81de89..99600f1 100644 --- a/prefab/roomTemplates/dungeon/horizontalCorridorWithSewer.tscn +++ b/prefab/roomTemplates/dungeon/horizontalCorridorWithSewer.tscn @@ -55,7 +55,6 @@ shape = SubResource("RectangleShape2D_131jn") [node name="Marker2D" type="Marker2D" parent="."] position = Vector2(237, 69) script = ExtResource("2_7q101") -ResPath = null metadata/ResPath = "res://prefab/entitys/DelivererOfDarkMagic.tscn" [node name="NavigationRegion2D" type="NavigationRegion2D" parent="."] diff --git a/scenes/game.tscn b/scenes/game.tscn index 115c3b5..4f0f259 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -95,7 +95,7 @@ grow_horizontal = 2 [node name="MapContainer" parent="CanvasLayer/Control" instance=ExtResource("6_ljdj4")] layout_mode = 1 -[node name="BackpackUIContainer" type="Control" parent="CanvasLayer"] +[node name="DynamicUiGroup" type="Control" parent="CanvasLayer"] visible = false layout_mode = 3 anchors_preset = 15 diff --git a/scripts/GameSceneDepend.cs b/scripts/GameSceneDepend.cs index 5b5d5d9..64e3efa 100644 --- a/scripts/GameSceneDepend.cs +++ b/scripts/GameSceneDepend.cs @@ -91,14 +91,14 @@ public static class GameSceneDepend /// 操作提示 /// public static RichTextLabel? OperationTipLabel { get; set; } - + /// - /// BackpackUiContainer - /// 背包Ui容器 + /// DynamicUiGroup + /// 动态生成的Ui组 /// /// - ///The knapsack Ui container houses the container of the knapsack ui node. When a user uses a backpack, the node to which his backpack is attached is displayed from within the backpack ui container. - ///背包Ui容器内存放的是背包ui节点的容器。当用户使用背包时,会从背包ui容器内将其背包对于的节点展示出来。 + ///Dynamically generated Ui objects will be placed under this node + ///动态生成的Ui对象将放置在此节点下 /// - public static UiGroup? BackpackUiContainer { get; set; } + public static UiGroup? DynamicUiGroup { get; set; } } \ No newline at end of file diff --git a/scripts/character/Player.cs b/scripts/character/Player.cs index 6b5897b..e5a453b 100644 --- a/scripts/character/Player.cs +++ b/scripts/character/Player.cs @@ -89,7 +89,7 @@ public partial class Player : CharacterTemplate private void SelectedItemSlotChangeEvent(SelectedItemSlotChangeEvent selectedItemSlotChangeEvent) { var item = selectedItemSlotChangeEvent.NewItemSlotNode?.GetItem(); - GameSceneDepend.BackpackUiContainer?.HideAllControl(); + GameSceneDepend.DynamicUiGroup?.HideAllControl(); if (item is Node2D node2D) { CurrentItem = node2D; @@ -303,7 +303,7 @@ public partial class Player : CharacterTemplate } ThrowItem(ItemContainer.GetSelectIndex(), 1, GetThrowVelocity()); - GameSceneDepend.BackpackUiContainer?.HideAllControl(); + GameSceneDepend.DynamicUiGroup?.HideAllControl(); CurrentItem = null; } } diff --git a/scripts/inventory/Packsack.cs b/scripts/inventory/Packsack.cs index 1245dd7..8c48f65 100644 --- a/scripts/inventory/Packsack.cs +++ b/scripts/inventory/Packsack.cs @@ -59,7 +59,7 @@ public partial class Packsack : PickAbleTemplate if (_packsackUi != null) { - GameSceneDepend.BackpackUiContainer?.ShowControl(_packsackUi); + GameSceneDepend.DynamicUiGroup?.ShowControl(_packsackUi); } } diff --git a/scripts/loader/sceneLoader/GameSceneLoader.cs b/scripts/loader/sceneLoader/GameSceneLoader.cs index 551e0c7..e39855d 100644 --- a/scripts/loader/sceneLoader/GameSceneLoader.cs +++ b/scripts/loader/sceneLoader/GameSceneLoader.cs @@ -31,8 +31,8 @@ public partial class GameSceneLoader : SceneLoaderTemplate GameSceneDepend.HotBar = hotBar; //Backpack Ui container //背包Ui容器 - var backpackUiContainer = GetNode("CanvasLayer/BackpackUIContainer"); - GameSceneDepend.BackpackUiContainer = backpackUiContainer; + var backpackUiContainer = GetNode("CanvasLayer/DynamicUiGroup"); + GameSceneDepend.DynamicUiGroup = backpackUiContainer; //Load operation prompt //加载操作提示 var operationTip = GetNode("CanvasLayer/Control/VBoxContainer/OperationTip"); diff --git a/scripts/loader/uiLoader/PacksackUi.cs b/scripts/loader/uiLoader/PacksackUi.cs index 4ad9470..50a6847 100644 --- a/scripts/loader/uiLoader/PacksackUi.cs +++ b/scripts/loader/uiLoader/PacksackUi.cs @@ -107,7 +107,7 @@ public partial class PacksackUi : UiLoaderTemplate { _exitButton.Pressed += () => { - GameSceneDepend.BackpackUiContainer?.HideControl(this); + GameSceneDepend.DynamicUiGroup?.HideControl(this); }; } } diff --git a/scripts/utils/NodeUtils.cs b/scripts/utils/NodeUtils.cs index edd1bc2..4761ab2 100644 --- a/scripts/utils/NodeUtils.cs +++ b/scripts/utils/NodeUtils.cs @@ -245,9 +245,9 @@ public static class NodeUtils return GameSceneDepend.PacksackContainer; } - if (GameSceneDepend.BackpackUiContainer != null && childNode is PacksackUi) + if (GameSceneDepend.DynamicUiGroup != null && childNode is PacksackUi) { - return GameSceneDepend.BackpackUiContainer; + return GameSceneDepend.DynamicUiGroup; } return defaultParentNode;