Esempio n. 1
0
 protected void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this);
         throw new Exception("An instance of EarthManager already exists.");
     }
     else
     {
         _instance = this;
     }
 }
Esempio n. 2
0
 protected void OnDestroy()
 {
     _instance = null;
 }
Esempio n. 3
0
 void Awake()
 {
     S = this;
 }