private IEnumerator SpawnAllEnemiesInWave(JH_WaveConfig waveConfig)
 {
     for (int enemyCount = 0; enemyCount < waveConfig.GetNumberOfEnemies(); enemyCount++)
     {
         var newEnemy = Instantiate(waveConfig.GetEnemyPrefab(),
                                    waveConfig.GetWaypoints()[0].transform.position,
                                    Quaternion.identity);
         newEnemy.GetComponent <JH_EnemyPathing>().SetWaveConfig(waveConfig);
         yield return(new WaitForSeconds(waveConfig.GetTimeBetweenSpawns()));
     }
 }
 void Start()
 {
     waypoints          = waveConfig.GetWaypoints();
     transform.position = waypoints[waypointIndex].transform.position;
 }