Exemple #1
0
 private void checkIfShootNeeded()
 {
     if (m_ShootAvailble
         &&
         (m_InputManager.KeyPressed(m_Shootingkey)
          ||
          (m_MouseMode && m_InputManager.ButtonPressed(k_MouseShootingButton))))
     {
         r_ShootingMachine.Shoot(GetPositionForShootiong(), this);
     }
 }
Exemple #2
0
        public bool ShootBullet()
        {
            bool  shootSucceed  = false;
            int   enemyindex    = getRandomListIndex();
            Enemy enemyShooting = r_Enemies[enemyindex];

            if (!enemyShooting.BulletOnScreen && r_ShootingMachine.Shoot(enemyShooting.GetPositionForShootiong(), enemyShooting))
            {
                enemyShooting.BulletOnScreen = true;
                shootSucceed = true;
            }

            return(shootSucceed);
        }