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



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