Esempio n. 1
0
 private void OnLevelWasLoaded(int level)
 {
     instance = this;
     Debug.Log("Level: " + level);
     if (instance == null)
     {
         Debug.Log("WTF:1"); instance = this;
     }
     if (Server_Manager.instance == null)
     {
         Debug.Log("WTF:2"); Server_Manager.instance = this;
     }
 }
Esempio n. 2
0
 private void LateStart()
 {
     if (Client_Manager.instance)
     {
         InvokeRepeating("SlowUpdateClient", 0.50f, 1.0f); Debug.Log("1");
     }                                                                                                 //Start In, Repeat Every
     else if (Server_Manager.instance)
     {
         server_Manager = Server_Manager.instance; InvokeRepeating("SlowUpdateServer", 0.50f, 1.0f); Debug.Log("2");
     }                                                                                                                                                //Start In, Repeat Every
     else if (Client_Manager.instance == null && server_Manager == null)
     {
         InvokeRepeating("SlowUpdateSP", 0.50f, 1.0f); Debug.Log("3");
     }                                                                                                                                    //Start In, Repeat Every
 }
Esempio n. 3
0
 public void SetInstance()
 {
     instance = this;
 }
Esempio n. 4
0
 private void Awake()
 {
     instance = this;
     DontDestroyOnLoad(this.gameObject);
 }