UI 系统
This commit is contained in:
@@ -20,6 +20,10 @@ namespace BaseGames.Input
|
||||
[Tooltip("背包 Tab:上一页(L/R 肩键)。对应 EVT_InventoryTabPrev。绑定 \"InventoryTabPrev\" Action(可选)。")]
|
||||
[SerializeField] private VoidEventChannelSO _onInventoryTabPrev;
|
||||
|
||||
[Header("快速直达(Gameplay/UI Action:QuickMap,可选)")]
|
||||
[Tooltip("快速打开地图 Tab。对应 EVT_QuickOpenMap。绑定 \"QuickMap\" Action(默认 M)。")]
|
||||
[SerializeField] private VoidEventChannelSO _onQuickMap;
|
||||
|
||||
[Header("UI 操作")]
|
||||
[Tooltip("UI 取消操作(ESC / 手柄 B·Circle)。由 UIManager 全局订阅,关闭当前栈顶面板。对应 EVT_UICancelPressed。")]
|
||||
[SerializeField] private VoidEventChannelSO _onUICancelPressed;
|
||||
@@ -32,9 +36,9 @@ namespace BaseGames.Input
|
||||
public event Action ParryEvent;
|
||||
public event Action DashEvent;
|
||||
public event Action UseSpringEvent;
|
||||
public event Action SwitchSkyFormEvent;
|
||||
public event Action SwitchEarthFormEvent;
|
||||
public event Action SwitchDeathFormEvent;
|
||||
public event Action SwitchTianHunFormEvent;
|
||||
public event Action SwitchDiHunFormEvent;
|
||||
public event Action SwitchMingHunFormEvent;
|
||||
public event Action SoulSkillEvent;
|
||||
public event Action SpiritSkill1StartedEvent;
|
||||
public event Action SpiritSkill1CancelledEvent;
|
||||
@@ -192,9 +196,9 @@ namespace BaseGames.Input
|
||||
BindStarted(_gameplay, "Parry", () => ParryEvent?.Invoke());
|
||||
BindStarted(_gameplay, "Dash", () => DashEvent?.Invoke());
|
||||
BindStarted(_gameplay, "UseSpring", () => UseSpringEvent?.Invoke());
|
||||
BindStarted(_gameplay, "SwitchSkyForm", () => SwitchSkyFormEvent?.Invoke());
|
||||
BindStarted(_gameplay, "SwitchEarthForm", () => SwitchEarthFormEvent?.Invoke());
|
||||
BindStarted(_gameplay, "SwitchDeathForm", () => SwitchDeathFormEvent?.Invoke());
|
||||
BindStarted(_gameplay, "SwitchTianHunForm", () => SwitchTianHunFormEvent?.Invoke());
|
||||
BindStarted(_gameplay, "SwitchDiHunForm", () => SwitchDiHunFormEvent?.Invoke());
|
||||
BindStarted(_gameplay, "SwitchMingHunForm", () => SwitchMingHunFormEvent?.Invoke());
|
||||
BindStarted(_gameplay, "SoulSkill", () => SoulSkillEvent?.Invoke());
|
||||
BindStarted(_gameplay, "SpiritSkill1", () => SpiritSkill1StartedEvent?.Invoke());
|
||||
BindCanceled(_gameplay, "SpiritSkill1", () => SpiritSkill1CancelledEvent?.Invoke());
|
||||
@@ -208,6 +212,8 @@ namespace BaseGames.Input
|
||||
BindStarted(_gameplay, "Pause", HandlePause);
|
||||
// 背包菜单开关(可选 Action:默认绑定如 I 键 / 手柄 Select)。未在 Map 中定义则跳过。
|
||||
BindStarted(_gameplay, "Inventory", () => _onInventoryOpen?.Raise());
|
||||
// 快速直达地图(可选 Action:QuickMap,默认 M)。未定义则跳过。
|
||||
BindStarted(_gameplay, "QuickMap", () => _onQuickMap?.Raise());
|
||||
|
||||
if (_ui != null)
|
||||
{
|
||||
@@ -224,6 +230,8 @@ namespace BaseGames.Input
|
||||
// 背包 Tab 循环(L/R 肩键);Action 名称需在 InputActionAsset UI Map 中添加(可选)
|
||||
BindStarted(_ui, "InventoryTabNext", () => _onInventoryTabNext?.Raise());
|
||||
BindStarted(_ui, "InventoryTabPrev", () => _onInventoryTabPrev?.Raise());
|
||||
// 快速直达(UI Map 同名 Action):Hub 已开时按 M 直接跳地图 Tab。共用 Gameplay 同一频道。
|
||||
BindStarted(_ui, "QuickMap", () => _onQuickMap?.Raise());
|
||||
}
|
||||
|
||||
_isBound = true;
|
||||
|
||||
Reference in New Issue
Block a user