2013-11-28 08:33:29 +01:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
//Created by Erik and Linda of the GameLogic team
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
2013-11-25 12:51:58 +01:00
|
|
|
#ifndef REFMANAGER_H
|
|
|
|
#define REFMANAGER_H
|
|
|
|
|
|
|
|
#include<map>
|
|
|
|
#include "Object.h"
|
|
|
|
|
|
|
|
namespace GameLogic
|
|
|
|
{
|
|
|
|
|
|
|
|
class RefManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RefManager(void);
|
|
|
|
~RefManager(void);
|
|
|
|
|
2013-11-28 11:23:11 +01:00
|
|
|
static RefManager* getInstance( );
|
|
|
|
void Release();
|
|
|
|
|
|
|
|
|
2013-12-03 11:47:04 +01:00
|
|
|
Object* GetMap(const Oyster::Physics::ICustomBody &body); //returns the object of an rigidBody, mainly used for CollisionHandler
|
|
|
|
void AddMapping(const Oyster::Physics::ICustomBody &body, Object &obj); //adds a mapping with body as key and the object as a value
|
2013-11-25 12:51:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
private:
|
2013-11-28 11:23:11 +01:00
|
|
|
static RefManager* instance;
|
2013-12-03 11:47:04 +01:00
|
|
|
std::map<const Oyster::Physics::ICustomBody*,Object*> mapper; //mapper points a rigidBody to an actual game object
|
2013-11-25 12:51:58 +01:00
|
|
|
|
2013-11-28 11:23:11 +01:00
|
|
|
|
2013-11-25 12:51:58 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|