Esempio n. 1
0
 private bool isAllowedToShoot()
 {
     return(!this.isDying &&
            (SpaceInvadersServices.GetShootingSpriteAmountOfAliveBullets(this.GameScreen, this) < r_MaxAmountOfBulletsAtOnec) &&
            (m_LastBTNState == ButtonState.Pressed && Configuration.IsMouseMovementEnable && m_InputManager.MouseState.LeftButton == ButtonState.Released ||
             m_InputManager.KeyPressed(Configuration.KeysShoot)));
 }
Esempio n. 2
0
 public void ShootBullet(Color i_Color)
 {
     if (SpaceInvadersServices.GetShootingSpriteAmountOfAliveBullets(this.GameScreen, this) == 0)
     {
         getAndShootBullet(i_Color, r_BulletVelocity);
         m_ShootSound.Play();
     }
 }