O'Reilly logo

XNA 4.0 Game Development by Example Beginner's Guide by Kurt Jaegers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - the GoalManager class

  1. Add a new class called GoalManager to the Robot Rampage project.
  2. Add the following using directives to the top of the class file:
    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Graphics;
    
  3. Modify the declaration of the GoalManager class to make it a static class:
    static class GoalManager
    
  4. Add declarations to the GoalManager class:
    #region Declarations private static List<ComputerTerminal> computerTerminals = new List<ComputerTerminal>(); private static int activeCount = 0; private static int minDistanceFromPlayer = 250; private static Random rand = new Random(); private static Texture2D texture; private static Rectangle initialActiveFrame; private static Rectangle initialDisabledFrame; private ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required