事件系统扩展
This commit is contained in:
@@ -22,7 +22,6 @@ namespace AibisDream
|
||||
private CursorState _curState = CursorState.Default;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
// 卸载时注销事件
|
||||
private List<IUnRegister> _unRegisters = new();
|
||||
@@ -68,10 +67,13 @@ namespace AibisDream
|
||||
_unRegisters.Add(EnumEventSystem.Global.Register<DialogEventEnum, DialogLine>(DialogEventEnum.LineStart,
|
||||
_ => SwitchCursor(talking)));
|
||||
_unRegisters.Add(EnumEventSystem.Global.Register(DialogEventEnum.LineShowed, () => SwitchCursor(nextTalk)));
|
||||
_unRegisters.Add(EnumEventSystem.Global.Register(DialogEventEnum.LineEnd, () => SwitchCursorDelay(defaultCursor)));
|
||||
_unRegisters.Add(EnumEventSystem.Global.Register(DialogEventEnum.LineEnd,
|
||||
() => SwitchCursorDelay(defaultCursor)));
|
||||
_unRegisters.Add(EnumEventSystem.Global.Register(DialogEventEnum.OptionShow, () => SwitchCursor(option)));
|
||||
_unRegisters.Add(EnumEventSystem.Global.Register(DialogEventEnum.OptionSelected, () => SwitchCursorDelay(defaultCursor)));
|
||||
|
||||
_unRegisters.Add(
|
||||
EnumEventSystem.Global.Register<DialogEventEnum, DialogLine>(DialogEventEnum.OptionSelected,
|
||||
_ => SwitchCursorDelay(defaultCursor)));
|
||||
|
||||
// 交互相关
|
||||
_unRegisters.Add(EnumEventSystem.Global.Register(InteractionEventEnum.Start, OnInteractiveStart));
|
||||
_unRegisters.Add(EnumEventSystem.Global.Register(InteractionEventEnum.End, OnInteractiveEnd));
|
||||
@@ -84,7 +86,7 @@ namespace AibisDream
|
||||
CameraKit.Instance.uiCamera, out var worldPos);
|
||||
|
||||
_cursor.rectTransform.localPosition = worldPos;
|
||||
|
||||
|
||||
// 在输入状态,要单独处理
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user