IEnumerator FireWave(WaveAmmo wAmmo) { if (!IsOutOfAmmo && GameManager.instance.gameState == GameState.gamePlay) { isFiring = true; wAmmo.SpawnWave(this, team); currentAmmoCount--; if (currentAmmoCount != maxAmmoCount && !alreadyRefilling) { StartCoroutine(RefillingAmmo()); } yield return(new WaitForSeconds(fireRate)); } isFiring = false; }
public void FireWave2() { currentWave = waves[1]; StartWave(); }
public void FireWave3() { currentWave = waves[2]; StartWave(); }
public void FireWave1() { currentWave = waves[0]; StartWave(); }