Exemplo n.º 1
0
 public void ShootBullets(SkyKidGame world)
 {
     if(FramesUntilCanShootAgain == 0)
     {
         FramesUntilCanShootAgain = FramesPerShot;
         SkyKidGame.Bullet b = new SkyKidGame.Bullet();
         b.x = X + Width + 2;
         b.y = Y + 5;
         b.left = false;
         SkyKidGame.Bullets.AddFirst(b);
     }
 }
Exemplo n.º 2
0
 public void ShootBullets(SkyKidGame world)
 {
     if (FramesUntilCanShootAgain == 0)
     {
         FramesUntilCanShootAgain = FramesPerShot;
         SkyKidGame.Bullet b = new SkyKidGame.Bullet();
         b.x    = X + Width + 2;
         b.y    = Y + 5;
         b.left = false;
         SkyKidGame.Bullets.AddFirst(b);
     }
 }
Exemplo n.º 3
0
 private void CheckForShoot(SkyKidGame world, KeyboardState ks)
 {
     if (ks.IsKeyDown(Keys.A) && FramesUntilCanShootAgain == 0)
     {
         FramesUntilCanShootAgain = FramesPerShot;
         SkyKidGame.Bullet b = new SkyKidGame.Bullet();
         //Arbitrarily decide where to spawn bullet
         b.x = X - 2;
         b.y = Y + 5;
         b.left = true;
         SkyKidGame.Bullets.AddFirst(b);
     }
 }
Exemplo n.º 4
0
 private void CheckForShoot(SkyKidGame world, KeyboardState ks)
 {
     if (ks.IsKeyDown(Keys.A) && FramesUntilCanShootAgain == 0)
     {
         FramesUntilCanShootAgain = FramesPerShot;
         SkyKidGame.Bullet b = new SkyKidGame.Bullet();
         //Arbitrarily decide where to spawn bullet
         b.x = X - 2;
         b.y = Y + 5;
         b.left = true;
         SkyKidGame.Bullets.AddFirst(b);
     }
 }