private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Beispiel #2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
     levelName = "Asteroides";
 }
Beispiel #3
0
 /// <summary>
 /// Creates the Managers as these need to set before they can used.
 /// </summary>
 private void CreateManagers()
 {
     ProjectileManager = new ProjectileManager();
     AsteroidsManager  = new AsteroidsManager();
 }
Beispiel #4
0
 void Awake()
 {
     asteroidManager = GameObject.FindGameObjectWithTag("asteroidManager").GetComponent <AsteroidsManager>();
 }