Beispiel #1
0
 /// <summary>
 /// Deactivates the unit and plays the death animation.
 /// </summary>
 void KillUnit()
 {
     m_Animation.PlayDeathAnimation();
     Debug.Log(this.name + " was killed!");
     GameManager.s_Instance.DisplayMessage(this.name + " was killed!");
     if (this.m_UnitAttributes.troopSize <= 0)
     {
         this.transform.GetComponentInChildren <Collider>().enabled = false;
     }
     //Destroy(this.transform.parent.gameObject, 5);
 }