Modifying a node Name.
修改节点名称。
This commit is contained in:
parent
c25d985f87
commit
cb19423cb0
|
@ -29,12 +29,8 @@ collision_mask = 162
|
||||||
platform_floor_layers = 4294967042
|
platform_floor_layers = 4294967042
|
||||||
platform_wall_layers = 128
|
platform_wall_layers = 128
|
||||||
script = ExtResource("1_1dlls")
|
script = ExtResource("1_1dlls")
|
||||||
CharacterName = null
|
|
||||||
CanMutateAfterDeath = null
|
|
||||||
_initialHp = null
|
|
||||||
MaxHp = 32
|
MaxHp = 32
|
||||||
CampId = "Default"
|
CampId = "Default"
|
||||||
LootListId = null
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
shape = SubResource("CapsuleShape2D_bb8wt")
|
shape = SubResource("CapsuleShape2D_bb8wt")
|
||||||
|
|
|
@ -55,7 +55,6 @@ shape = SubResource("RectangleShape2D_131jn")
|
||||||
[node name="Marker2D" type="Marker2D" parent="."]
|
[node name="Marker2D" type="Marker2D" parent="."]
|
||||||
position = Vector2(237, 69)
|
position = Vector2(237, 69)
|
||||||
script = ExtResource("2_7q101")
|
script = ExtResource("2_7q101")
|
||||||
ResPath = null
|
|
||||||
metadata/ResPath = "res://prefab/entitys/DelivererOfDarkMagic.tscn"
|
metadata/ResPath = "res://prefab/entitys/DelivererOfDarkMagic.tscn"
|
||||||
|
|
||||||
[node name="NavigationRegion2D" type="NavigationRegion2D" parent="."]
|
[node name="NavigationRegion2D" type="NavigationRegion2D" parent="."]
|
||||||
|
|
|
@ -95,7 +95,7 @@ grow_horizontal = 2
|
||||||
[node name="MapContainer" parent="CanvasLayer/Control" instance=ExtResource("6_ljdj4")]
|
[node name="MapContainer" parent="CanvasLayer/Control" instance=ExtResource("6_ljdj4")]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
|
||||||
[node name="BackpackUIContainer" type="Control" parent="CanvasLayer"]
|
[node name="DynamicUiGroup" type="Control" parent="CanvasLayer"]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
|
|
|
@ -91,14 +91,14 @@ public static class GameSceneDepend
|
||||||
/// <para>操作提示</para>
|
/// <para>操作提示</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static RichTextLabel? OperationTipLabel { get; set; }
|
public static RichTextLabel? OperationTipLabel { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>BackpackUiContainer</para>
|
/// <para>DynamicUiGroup</para>
|
||||||
/// <para>背包Ui容器</para>
|
/// <para>动态生成的Ui组</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
///<para>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.</para>
|
///<para>Dynamically generated Ui objects will be placed under this node</para>
|
||||||
///<para>背包Ui容器内存放的是背包ui节点的容器。当用户使用背包时,会从背包ui容器内将其背包对于的节点展示出来。</para>
|
///<para>动态生成的Ui对象将放置在此节点下</para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static UiGroup? BackpackUiContainer { get; set; }
|
public static UiGroup? DynamicUiGroup { get; set; }
|
||||||
}
|
}
|
|
@ -89,7 +89,7 @@ public partial class Player : CharacterTemplate
|
||||||
private void SelectedItemSlotChangeEvent(SelectedItemSlotChangeEvent selectedItemSlotChangeEvent)
|
private void SelectedItemSlotChangeEvent(SelectedItemSlotChangeEvent selectedItemSlotChangeEvent)
|
||||||
{
|
{
|
||||||
var item = selectedItemSlotChangeEvent.NewItemSlotNode?.GetItem();
|
var item = selectedItemSlotChangeEvent.NewItemSlotNode?.GetItem();
|
||||||
GameSceneDepend.BackpackUiContainer?.HideAllControl();
|
GameSceneDepend.DynamicUiGroup?.HideAllControl();
|
||||||
if (item is Node2D node2D)
|
if (item is Node2D node2D)
|
||||||
{
|
{
|
||||||
CurrentItem = node2D;
|
CurrentItem = node2D;
|
||||||
|
@ -303,7 +303,7 @@ public partial class Player : CharacterTemplate
|
||||||
}
|
}
|
||||||
|
|
||||||
ThrowItem(ItemContainer.GetSelectIndex(), 1, GetThrowVelocity());
|
ThrowItem(ItemContainer.GetSelectIndex(), 1, GetThrowVelocity());
|
||||||
GameSceneDepend.BackpackUiContainer?.HideAllControl();
|
GameSceneDepend.DynamicUiGroup?.HideAllControl();
|
||||||
CurrentItem = null;
|
CurrentItem = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public partial class Packsack : PickAbleTemplate
|
||||||
|
|
||||||
if (_packsackUi != null)
|
if (_packsackUi != null)
|
||||||
{
|
{
|
||||||
GameSceneDepend.BackpackUiContainer?.ShowControl(_packsackUi);
|
GameSceneDepend.DynamicUiGroup?.ShowControl(_packsackUi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@ public partial class GameSceneLoader : SceneLoaderTemplate
|
||||||
GameSceneDepend.HotBar = hotBar;
|
GameSceneDepend.HotBar = hotBar;
|
||||||
//Backpack Ui container
|
//Backpack Ui container
|
||||||
//背包Ui容器
|
//背包Ui容器
|
||||||
var backpackUiContainer = GetNode<UiGroup>("CanvasLayer/BackpackUIContainer");
|
var backpackUiContainer = GetNode<UiGroup>("CanvasLayer/DynamicUiGroup");
|
||||||
GameSceneDepend.BackpackUiContainer = backpackUiContainer;
|
GameSceneDepend.DynamicUiGroup = backpackUiContainer;
|
||||||
//Load operation prompt
|
//Load operation prompt
|
||||||
//加载操作提示
|
//加载操作提示
|
||||||
var operationTip = GetNode<RichTextLabel>("CanvasLayer/Control/VBoxContainer/OperationTip");
|
var operationTip = GetNode<RichTextLabel>("CanvasLayer/Control/VBoxContainer/OperationTip");
|
||||||
|
|
|
@ -107,7 +107,7 @@ public partial class PacksackUi : UiLoaderTemplate
|
||||||
{
|
{
|
||||||
_exitButton.Pressed += () =>
|
_exitButton.Pressed += () =>
|
||||||
{
|
{
|
||||||
GameSceneDepend.BackpackUiContainer?.HideControl(this);
|
GameSceneDepend.DynamicUiGroup?.HideControl(this);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,9 +245,9 @@ public static class NodeUtils
|
||||||
return GameSceneDepend.PacksackContainer;
|
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;
|
return defaultParentNode;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user