IEnumerator Die(GameObject o) { yield return(new WaitForSeconds(0.8f)); Destroy(o); instance = this; }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
void Start() { instance = this; }