Time for action – setting up the EnemyManager class
Add the
setUpWaypoints()
helper function to the EnemyManager class:private void setUpWaypoints() { List<Vector2> path0 = new List<Vector2>(); path0.Add(new Vector2(850, 300)); path0.Add(new Vector2(-100, 300)); pathWaypoints.Add(path0); waveSpawns[0] = 0; List<Vector2> path1 = new List<Vector2>(); path1.Add(new Vector2(-50, 225)); path1.Add(new Vector2(850, 225)); pathWaypoints.Add(path1); waveSpawns[1] = 0; List<Vector2> path2 = new List<Vector2>(); path2.Add(new Vector2(-100, 50)); path2.Add(new Vector2(150, 50)); path2.Add(new Vector2(200, 75)); path2.Add(new Vector2(200, 125)); path2.Add(new Vector2(150, 150)); path2.Add(new Vector2(150, 175)); path2.Add(new Vector2(200, 200)); path2.Add(new Vector2(600, 200)); path2.Add(new Vector2(850, 600)); pathWaypoints.Add(path2); waveSpawns[2] = 0; List<Vector2...