void OnDestroy() { if (GetComponent <Health>().IsDead()) { ConfigurationObjectScript.getInstance().LevelCompleated(); } }
void Awake() { if (me != null && me != this) { Destroy(this.gameObject); return; } me = this; DontDestroyOnLoad(this.gameObject); }