예제 #1
0
 void Awake()
 {
     if (player_engine.instance == null)
     {
         player_engine.instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     } // else
 }     // fin del Awake
예제 #2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }