Ejemplo n.º 1
0
 /*
  * This function calls the function that
  * will delete the this object from the
  * game manager and the also deletes the
  * this objects clone.
  */
 public void death()
 {
     if (!this.name.EndsWith("(Clone)"))
     {
         CreateClone.DeleteClones(this.tag, this.name);
         GetComponentInParent <gameManager> ().deleteEntity(this.gameObject);
         this.gameObject.SetActive(false);
         Destroy(this.gameObject);
     }
 }