Ejemplo n.º 1
0
 // Use this for initialization
 void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject);
         return;
     }
     instance   = this;
     gameCamera = Camera.main;
 }
Ejemplo n.º 2
0
 void OnDestroy()
 {
     instance = null;
 }