You've already forked taptap2024_GJ_chidouren
init
This commit is contained in:
39
Assets/Scripts/System/GameSetup.cs
Normal file
39
Assets/Scripts/System/GameSetup.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Framework.Utils;
|
||||
using StateSystem;
|
||||
using UnityEngine;
|
||||
|
||||
namespace System
|
||||
{
|
||||
/// <summary>
|
||||
/// 游戏入口
|
||||
/// </summary>
|
||||
public class GameSetup : MonoBehaviour
|
||||
{
|
||||
private void Awake()
|
||||
{
|
||||
#if DebugLog
|
||||
DebugLogTrigger.Instance.StartLog();
|
||||
#endif
|
||||
#if UNITY_EDITOR
|
||||
DontDestroyOnLoad (this.gameObject);
|
||||
#endif
|
||||
GameStateManager.Instance.Active(StateSystem.GameGlobalState.GameBegin);
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.InitializeOnLoadMethod]
|
||||
static void InitializeOnLoadMethod()
|
||||
{
|
||||
UnityEditor.EditorApplication.wantsToQuit -= OnExit;
|
||||
UnityEditor.EditorApplication.wantsToQuit += OnExit;
|
||||
}
|
||||
|
||||
static bool OnExit ()
|
||||
{
|
||||
CameraEffectUtils.Instance.SetGameCamBlur (0 , 0 , null , BlurEffectType.Blur);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user