You've already forked taptap2024_GJ_chidouren
update 主程序逻辑
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Framework.Utils;
|
||||
using StateSystem;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace System
|
||||
@@ -24,8 +25,19 @@ namespace System
|
||||
[UnityEditor.InitializeOnLoadMethod]
|
||||
static void InitializeOnLoadMethod()
|
||||
{
|
||||
UnityEditor.EditorApplication.wantsToQuit -= OnExit;
|
||||
UnityEditor.EditorApplication.wantsToQuit += OnExit;
|
||||
UnityEditor.EditorApplication.playModeStateChanged -= OnPlaying;
|
||||
UnityEditor.EditorApplication.playModeStateChanged += OnPlaying;
|
||||
UnityEditor.EditorApplication.wantsToQuit -= OnExit;
|
||||
UnityEditor.EditorApplication.wantsToQuit += OnExit;
|
||||
}
|
||||
|
||||
//当编辑器运行时
|
||||
static void OnPlaying (PlayModeStateChange stateChange)
|
||||
{
|
||||
if (stateChange == PlayModeStateChange.EnteredPlayMode)
|
||||
{
|
||||
GameStateManager.Instance.Active(StateSystem.GameGlobalState.GameBegin);
|
||||
}
|
||||
}
|
||||
|
||||
static bool OnExit ()
|
||||
|
||||
Reference in New Issue
Block a user