Example #1
0
 public void Damage(int amount)
 {
     health -= amount;
     effects.FlashColour(Color.red, 0.5f);
     if (health <= 0)
     {
         if (isPossessed())
         {
             GameManager.gameManager.AI.occupiedGadgetDestroyed();
         }
         animations.Play(animations.Library.GetClipByName("Death"));
         Invoke("Explode", 1.0f);
         destroyed = true;
     }
 }