예제 #1
0
    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;
    }
예제 #2
0
 public void FireWave2()
 {
     currentWave = waves[1];
     StartWave();
 }
예제 #3
0
 public void FireWave3()
 {
     currentWave = waves[2];
     StartWave();
 }
예제 #4
0
 public void FireWave1()
 {
     currentWave = waves[0];
     StartWave();
 }