Update EventSystemEx.cs
This commit is contained in:
@@ -83,6 +83,16 @@ namespace AibisDream.Framework
|
||||
|
||||
#endregion
|
||||
|
||||
private void HandleDialogueComplete()
|
||||
{
|
||||
isLocked = false;
|
||||
}
|
||||
|
||||
private void HandleDialogueStart()
|
||||
{
|
||||
isLocked = true;
|
||||
}
|
||||
|
||||
#region 单例必须的代码
|
||||
|
||||
public override void OnSingletonInit()
|
||||
@@ -93,6 +103,9 @@ namespace AibisDream.Framework
|
||||
|
||||
EnumEventSystem.Global.Register(GameLoopEnum.GameStart, ClearAll);
|
||||
EnumEventSystem.Global.Register(GameLoopEnum.GameQuit, ClearAll);
|
||||
|
||||
EnumEventSystem.Global.Register(InteractionEventEnum.DialogEnd, HandleDialogueComplete);
|
||||
EnumEventSystem.Global.Register(InteractionEventEnum.DialogStart, HandleDialogueStart);
|
||||
}
|
||||
|
||||
private void ClearAll()
|
||||
@@ -106,6 +119,9 @@ namespace AibisDream.Framework
|
||||
{
|
||||
EnumEventSystem.Global.UnRegister(GameLoopEnum.GameStart, ClearAll);
|
||||
EnumEventSystem.Global.UnRegister(GameLoopEnum.GameQuit, ClearAll);
|
||||
|
||||
EnumEventSystem.Global.UnRegister(InteractionEventEnum.DialogEnd, HandleDialogueComplete);
|
||||
EnumEventSystem.Global.UnRegister(InteractionEventEnum.DialogStart, HandleDialogueStart);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user