Ejemplo n.º 1
0
 public void Die()
 {
     Life--;
     Game.Sounds.BallBounce.Play();
     if (IsAlive)
     {
         Flash();
     }
     else
     {
         PlayArena.Vaus.AddScore(Score == -1
             ? (PlayArena.LevelSelector.Level + 1) * 50
             : Score == -2 ? (PlayArena.LevelSelector.Level + 1) * 75 : Score);
         if (Chance != 0 && RandomUtils.ChanceIn(Chance))
         {
             var cap = Types.GetCapsule(CapsuleType, PlayArena, Game, Location);
             PlayArena.Capsules.Add(cap);
         }
     }
     if (Life == 0 && IsRegen)
     {
         Regen = new TimeSpan(0, 0, 0, 15);
     }
 }