#include <objectmanager.h>
Public Member Functions | |
| ~ObjectManager () | |
| void | AddObject (char *name, Object *ptr) |
| Object * | GetObject (char *name) |
| void | CheckCollisions () |
| void | Draw (SDL_Surface *screen) |
| void | Update () |
| void | Clear () |
Private Member Functions | |
| bool | IsColliding (Object *obj1, Object *obj2) |
| void | Bounce (Object *obj1, Object *obj2) |
Private Attributes | |
| std::map< char *, Object * > | m_list |
| std::map< char *, Object * >::iterator | m_iter |
| ObjectManager::~ObjectManager | ( | ) |
| void ObjectManager::AddObject | ( | char * | name, | |
| Object * | ptr | |||
| ) |
Adds an Object to the manager
| name | the name of the object(only once) | |
| ptr | the pointer to the object |
| Object * ObjectManager::GetObject | ( | char * | name | ) |
returns a pointer to an Object of the manager
| name | the name of the object |
| void ObjectManager::CheckCollisions | ( | ) |
Checks if there are any collisions between objects //TODO also reacts should be replaced by an function of objects
| void ObjectManager::Draw | ( | SDL_Surface * | screen | ) |
Calls to the draw function of the objects
| screen | the surface to which the objects will be drawn |
| void ObjectManager::Update | ( | ) |
Updates all objects
| void ObjectManager::Clear | ( | ) |
Clears all objects
std::map<char*, Object*> ObjectManager::m_list [private] |
std::map<char*, Object*>::iterator ObjectManager::m_iter [private] |
1.5.1-p1