(client) feat:添加基地界面到游玩界面的过程,添加存档管理,技能树变得可用 (#58)

Co-authored-by: m0_75251201 <m0_75251201@noreply.gitcode.com>
Reviewed-on: http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite/pulls/58
This commit is contained in:
2025-10-03 00:31:34 +08:00
parent aff747be17
commit dd9d90439d
134 changed files with 10322 additions and 4872 deletions

View File

@@ -37,9 +37,9 @@ namespace UI
Program.Instance.OnFocusedEntityChanged -= FocusEntityChanged;
}
// 如果聚焦实体及其背包存在,则取消订阅背包改变事件。
if (focusedEntity != null && focusedEntity.Inventory != null)
if (focusedEntity != null && focusedEntity.PlayerInventory != null)
{
focusedEntity.Inventory.OnInventoryChanged -= UpdateUI;
focusedEntity.PlayerInventory.OnInventoryChanged -= UpdateUI;
}
Clock.RemoveTick(this);
}
@@ -72,7 +72,7 @@ namespace UI
// 如果存在旧的聚焦实体,则先取消订阅其背包改变事件。
if (focusedEntity)
{
focusedEntity.Inventory.OnInventoryChanged -= UpdateUI;
focusedEntity.PlayerInventory.OnInventoryChanged -= UpdateUI;
}
// 设置新的聚焦实体,并尝试将其转换为 Character 类型。
@@ -81,7 +81,7 @@ namespace UI
// 如果新的聚焦实体存在且是 Character 类型,则订阅其背包改变事件。
if (focusedEntity)
{
focusedEntity.Inventory.OnInventoryChanged += UpdateUI;
focusedEntity.PlayerInventory.OnInventoryChanged += UpdateUI;
}
// 聚焦实体改变后更新 UI 显示。
@@ -102,7 +102,7 @@ namespace UI
// 遍历角色的前三个装备槽假设物品栏只显示前3个槽位
for (var i = 0; i < 3; i++)
{
var slot = focusedEntity.Inventory.GetSlot(i);
var slot = focusedEntity.PlayerInventory.GetSlot(i);
if (i == currentSelectedIndex)
{