Пример #1
0
 void Awake()
 {
     instance = this;
     _        = Setting;
     Application.targetFrameRate = Setting.targetFrameRate;
     Application.wantsToQuit    += () =>
     {
         OnQuitting?.Invoke();
         return(canQuit);
     };
 }
Пример #2
0
 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));
 }
Пример #3
0
 //游戏启动----------------------------
 private void Awake()
 {
     instance = this;
 }
Пример #4
0
 /// <summary>
 /// 基于母体协程管理工程实现的功能,停止协程
 /// </summary>
 public static void StopCoroutine(LinkedListNode <Coroutine> node)
 {
     TheMatrix.StopCoroutine(node);
 }
Пример #5
0
 /// <summary>
 /// 基于母体协程管理工程实现的功能,停止所有协程
 /// </summary>
 public static void StopAllCoroutines()
 {
     TheMatrix.StopAllCoroutines(typeof(SubSetting));
 }
Пример #6
0
 /// <summary>
 /// 基于母体协程管理工程实现的功能,开始协程
 /// </summary>
 public static LinkedListNode <Coroutine> StartCoroutine(IEnumerator routine)
 {
     return(TheMatrix.StartCoroutine(routine, typeof(SubSetting)));
 }
Пример #7
0
 public static void LoadScene(TheMatrix.GameScene gameScene)
 {
     SceneManager.LoadScene(TheMatrix.GetScene(gameScene));
 }
Пример #8
0
        //存档管理



        void Awake()
        {
            instance = this;
        }
Пример #9
0
 /// <summary>
 /// 停止所有协程
 /// </summary>
 public static void StopAllCoroutine()
 {
     TheMatrix.StopAllCoroutine(typeof(MySystemSetting));
 }
Пример #10
0
 /// <summary>
 /// 调用协程
 /// </summary>
 /// <param name="enumerator"></param>
 /// <returns></returns>
 public static LinkedListNode <Coroutine> StartCoroutine(IEnumerator enumerator)
 {
     return(TheMatrix.StartCoroutine(enumerator, typeof(MySystemSetting)));
 }
Пример #11
0
 //游戏启动----------------------------
 private void Awake()
 {
     Application.wantsToQuit += beforeQuitting;
     instance = this;
 }