Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     if (MainMgr == null)
     {
         MainMgr = this;
         DontDestroyOnLoad(GameObject.Find("MainCanvas"));
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(GameObject.Find("MainCanvas"));
         Destroy(gameObject);
     }
     SceneManager.activeSceneChanged += ((first, second) =>
     {
         //记录上一个场景号
         Debug.LogError(first.name + " --->> " + second.name);
     });
     GlobalManager.LoadScene("Welcome");
 }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     _instance = this;
     Shoal.Instance.OnDethEvent += OnGameEnd;
     Musiccontroller._instance.PlayMusic(0);
 }
Beispiel #3
0
 // Use this for initialization
 void Start()
 {
     nextLevel = MainSceneMgr.GetInstance().nextLevelNum;
 }