Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
private IEnumerator SpawnAllEnemiesInWave(WaveConfig waveConfig) { for (int enemyCount = 0; enemyCount < waveConfig.GetNumderOfEnemies(); enemyCount++) { var newEnemy = Instantiate( waveConfig.GetEnemyPrefab(), waveConfig.GetWayPoints()[0].transform.position, Quaternion.identity); newEnemy.GetComponent <EnemyPathing>().SetWaveConfig(waveConfig); yield return(new WaitForSeconds(waveConfig.GetTimeBetweenSpawns())); } }