Пример #1
0
 //destroyes enemy gameobect and script plays death animation
 public void Die()
 {
     Debug.Log(this.name + " Died.");
     GetComponent <Collider2D>().enabled = false;
     Destroy(this.gameObject);
     //play death anim
     parent.destroyGameObject();
     this.enabled = false;
 }