Game Development Reference
In-Depth Information
The GamePlayController Class
The GamePlayController class is used to control the game play in terms of how many enemies of
each type are allowed on the gravity grid, the location they first appear at, and at what rate they
appear.
The m_RandNumber variable holds the random number generator.
private Random m_RandNumber = new Random();
The m_ArenaObjectsSet variable holds the set of arena objects that will be used on the playfield.
private ArenaObjectSet m_ArenaObjectsSet;
The m_TankFleet variable holds the set of tanks to be used on the playfield.
private TankFleet m_TankFleet;
The m_Grid variable holds the gravity grid that marks the boundaries of the playfield.
private GravityGridEx m_Grid;
The DROP_HEIGHT variable indicates the height at which the arena objects will be dropped onto the
playfield.
private float DROP_HEIGHT = 13;
The m_TimeDeltaAddArenaObject variable holds the number of milliseconds between adding new
arena objects.
private long m_TimeDeltaAddArenaObject = 1000 * 15;
The m_TimeLastArenaObjectAdded variable holds the time that the last arena object was added to the
playfield.
private long m_TimeLastArenaObjectAdded = 0;
The m_MinArenaObjectsOnPlayField variable holds the minimum number of arena objects that must
be on the playfield.
private int m_MinArenaObjectsOnPlayField = 1;
The m_MaxSpeedArenaObjects variable holds the maximum speed for the arena objects.
private float m_MaxSpeedArenaObjects = 0.1f;
The m_TimeDeltaAddTank variable holds the number of milliseconds between adding new tanks onto
the playfield.
private long m_TimeDeltaAddTank = 1000 * 25;
 
Search WWH ::




Custom Search