Exemple #1
0
 private void fire()
 {
     if (Input.GetButton("Fire1"))
     {
         gunHelper.moveBullet(gunBullet, leftSpwonPosition);
         gunHelper.moveBullet(gunBullet, rightSpwonPosition);
         playAllMuzzleflash();
     }
     else
     {
         stopAllMuzzleflash();
     }
 }
        //main fire method
        private void fire()
        {
            if (Input.GetButtonDown("Fire1"))
            {
                for (int i = 0; i < leftSpwonPosition.Length; ++i)
                {
                    gunHelper.moveBullet(gunBullet, leftSpwonPosition[i]);
                    gunHelper.moveBullet(gunBullet, rightSpwonPosition[i]);
                }

                playAllMuzzleflash();
                audioSource.Play();
            }
            else
            {
                stopAllMuzzleflash();
            }
        }
Exemple #3
0
 private void shootGun()
 {
     audioSource.Play();
     gunHelper.moveBullet(bullet, leftSpwonPoint);
     gunHelper.moveBullet(bullet, rightSpwonPoint);
 }
Exemple #4
0
 private void shootGun()
 {
     gunHelper.moveBullet(bullet, leftSpwonPoint);
     gunHelper.moveBullet(bullet, rightSpwonPoint);
 }