Exemplo n.º 1
0
 protected void CheckCollisions()
 {
     foreach (var p in GameManager.player.Projectiles)
     {
         if (Helper.RectRect(rectangle, p.Rectangle))
         {
             if (p is Rocket)
             {
                 health -= (p as Rocket).Damage;
             }
             else if (p is Bullet)
             {
                 health -= (p as Bullet).Damage;
             }
             Effects.BigExplosion(position);
             p.isDead = true;
         }
     }
 }