Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
private IEnumerator SpawnAllEnemiesInWave(WaveConfig waveToSpawn) { for (int obstacleCount = 1; obstacleCount <= waveToSpawn.GetNoOfObstacles(); obstacleCount++) { var newObst = Instantiate( waveToSpawn.GetObstaclePrefab(), waveToSpawn.GetWaypointsList()[0].transform.position, Quaternion.identity) as GameObject; newObst.GetComponent <ObstaclePathing>().SetWaveConfig(waveToSpawn); yield return(new WaitForSeconds(waveToSpawn.GetTimeBetweenSpawns())); } }