void Awake() { instance = this; _ = Setting; Application.targetFrameRate = Setting.targetFrameRate; Application.wantsToQuit += () => { OnQuitting?.Invoke(); return(canQuit); }; }
public static IEnumerator LoadScene(TheMatrix.GameScene gameScene) { loadConfirmed = false; sceneToLoad = gameScene; OnPendingLoadScene?.Invoke(); Log("Pending Load Scene: " + gameScene); while (!loadConfirmed) { yield return(0); } Log("Load Confirmed!"); SceneManager.LoadScene(TheMatrix.GetScene(gameScene)); }
//游戏启动---------------------------- private void Awake() { instance = this; }
/// <summary> /// 基于母体协程管理工程实现的功能,停止协程 /// </summary> public static void StopCoroutine(LinkedListNode <Coroutine> node) { TheMatrix.StopCoroutine(node); }
/// <summary> /// 基于母体协程管理工程实现的功能,停止所有协程 /// </summary> public static void StopAllCoroutines() { TheMatrix.StopAllCoroutines(typeof(SubSetting)); }
/// <summary> /// 基于母体协程管理工程实现的功能,开始协程 /// </summary> public static LinkedListNode <Coroutine> StartCoroutine(IEnumerator routine) { return(TheMatrix.StartCoroutine(routine, typeof(SubSetting))); }
public static void LoadScene(TheMatrix.GameScene gameScene) { SceneManager.LoadScene(TheMatrix.GetScene(gameScene)); }
//存档管理 void Awake() { instance = this; }
/// <summary> /// 停止所有协程 /// </summary> public static void StopAllCoroutine() { TheMatrix.StopAllCoroutine(typeof(MySystemSetting)); }
/// <summary> /// 调用协程 /// </summary> /// <param name="enumerator"></param> /// <returns></returns> public static LinkedListNode <Coroutine> StartCoroutine(IEnumerator enumerator) { return(TheMatrix.StartCoroutine(enumerator, typeof(MySystemSetting))); }
//游戏启动---------------------------- private void Awake() { Application.wantsToQuit += beforeQuitting; instance = this; }