public void Execute()
 {
     if (player.Inventory.BlueCandle.Found && !player.Inventory.BlueCandle.UsedInRoom)
     {
         IProjectile blueCandle = new BlueCandleFlame();
         Util.CenterRelativeToEdge(player.Hitbox, player.Direction, blueCandle);
         projectiles.Add(blueCandle);
         player.Inventory.BlueCandle.UsedInRoom = true;
     }
 }
Пример #2
0
 public void Execute()
 {
     if (player.Inventory.Bombs > 0)
     {
         IProjectile bomb = new PlacedBomb(projectiles);
         Util.CenterRelativeToEdge(player.Hitbox, player.Direction, bomb);
         projectiles.Add(bomb);
         player.Inventory.Bombs -= 1;
     }
 }
Пример #3
0
 public override void Update()
 {
     base.Update();
     timer--;
     if (timer == 0)
     {
         center = new Explosion(X, Y);
         projectiles.Add(center);
         lowerRight = new Explosion(X + center.Hitbox.Width / 2, Y + center.Hitbox.Height / 2);
         projectiles.Add(lowerRight);
         midRight = new Explosion(X + center.Hitbox.Width, Y);
         projectiles.Add(midRight);
         topLeft = new Explosion(X - center.Hitbox.Width / 2, Y - center.Hitbox.Height / 2);
         projectiles.Add(topLeft);
     }
     else if (timer == -10)
     {
         lowerRight.X -= center.Hitbox.Width;
         midRight.X   -= 2 * center.Hitbox.Width;
         topLeft.X    += center.Hitbox.Width;
     }
 }