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(); } }
private void shootGun() { audioSource.Play(); gunHelper.moveBullet(bullet, leftSpwonPoint); gunHelper.moveBullet(bullet, rightSpwonPoint); }
private void shootGun() { gunHelper.moveBullet(bullet, leftSpwonPoint); gunHelper.moveBullet(bullet, rightSpwonPoint); }