Beispiel #1
0
    IEnumerator Die(GameObject o)
    {
        yield return(new WaitForSeconds(0.8f));

        Destroy(o);
        instance = this;
    }
Beispiel #2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Beispiel #3
0
 void Start()
 {
     instance = this;
 }