Pool End Game
Chapter 3 of Ian Parberry's "Introduction to Game Physics with Box2D"
|
The object manager. More...
#include <ObjectManager.h>
Public Member Functions | |
CObjectManager (int size) | |
Constructor. | |
~CObjectManager () | |
Destructor. | |
CGameObject * | create (GameObjectType objecttype) |
Create new object. | |
void | move () |
Move all objects. | |
virtual void | draw () |
Draw all objects. | |
void | clear () |
Clear the object list. | |
Protected Attributes | |
CGameObject ** | m_pObjectList |
List of game objects. | |
int | m_nCount |
How many objects in list. | |
int | m_nSize |
Maximum size of list. | |
Friends | |
class | CObjectWorld |
The object manager.
The object manager is responsible for managing game objects.
void CObjectManager::clear | ( | ) |
Clear the object list.
Clear out all game objects from the object list.
CGameObject * CObjectManager::create | ( | GameObjectType | objecttype | ) |
Create new object.
Create a new instance of a game object.
objecttype | The type of the new object |
|
virtual |
Draw all objects.
Ask the Render World to draw all of the game objects.
Reimplemented in CBallManager.
void CObjectManager::move | ( | ) |
Move all objects.
Move the game objects.