Pool End Game
Chapter 3 of Ian Parberry's "Introduction to Game Physics with Box2D"
 All Classes Files Functions Variables Enumerations Pages
Public Member Functions | Protected Attributes | Friends | List of all members
CObjectManager Class Reference

The object manager. More...

#include <ObjectManager.h>

Inheritance diagram for CObjectManager:
CBallManager

Public Member Functions

 CObjectManager (int size)
 Constructor.
 
 ~CObjectManager ()
 Destructor.
 
CGameObjectcreate (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
 

Detailed Description

The object manager.

The object manager is responsible for managing game objects.

Member Function Documentation

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.

Parameters
objecttypeThe type of the new object
void CObjectManager::draw ( )
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.