Time for action – setting up the EnemyManager class

  1. 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 ...

Get XNA 4.0 Game Development by Example Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.