feat: 优化存档管理,增强链状态获取逻辑,添加 ISaveable 接口支持
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using BaseGames.Core;
|
||||
using BaseGames.Core.Events;
|
||||
using BaseGames.Core.Save;
|
||||
using BaseGames.Player.States;
|
||||
@@ -26,6 +27,9 @@ namespace BaseGames.Equipment
|
||||
Debug.Assert(_toolCatalog != null, "[ToolSlotManager] _toolCatalog 未赋值,请在 Inspector 中指定 ToolCatalogSO。", this);
|
||||
}
|
||||
|
||||
private void OnEnable() => ServiceLocator.GetOrDefault<ISaveableRegistry>()?.Register(this);
|
||||
private void OnDisable() => ServiceLocator.GetOrDefault<ISaveableRegistry>()?.Unregister(this);
|
||||
|
||||
// ── 装备 ─────────────────────────────────────────────────────────────
|
||||
public void EquipTool(int slotIndex, ToolSO tool)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user