diff --git a/Code/GameLogic/GameLogic.vcxproj b/Code/GameLogic/GameLogic.vcxproj index df8f429b..1a32415f 100644 --- a/Code/GameLogic/GameLogic.vcxproj +++ b/Code/GameLogic/GameLogic.vcxproj @@ -170,6 +170,7 @@ + @@ -180,6 +181,7 @@ + diff --git a/Code/GameLogic/GameLogic.vcxproj.filters b/Code/GameLogic/GameLogic.vcxproj.filters index 4df71a7c..86e9fa9c 100644 --- a/Code/GameLogic/GameLogic.vcxproj.filters +++ b/Code/GameLogic/GameLogic.vcxproj.filters @@ -39,6 +39,9 @@ Header Files + + Header Files + @@ -68,5 +71,8 @@ Source Files + + Source Files + \ No newline at end of file diff --git a/Code/GameLogic/RefManager.cpp b/Code/GameLogic/RefManager.cpp new file mode 100644 index 00000000..852cb6b1 --- /dev/null +++ b/Code/GameLogic/RefManager.cpp @@ -0,0 +1,26 @@ +#include "RefManager.h" + +using namespace GameLogic; + +typedef std::pair mapData; + +RefManager::RefManager(void) +{ +} + + +RefManager::~RefManager(void) +{ +} + +Object* RefManager::GetMap(Oyster::Physics::ICustomBody *body) +{ + return mapper[body]; +} + +void RefManager::AddMapping(Oyster::Physics::ICustomBody *body, Object *obj) +{ + mapper.insert(mapData(body,obj)); +} + + diff --git a/Code/GameLogic/RefManager.h b/Code/GameLogic/RefManager.h new file mode 100644 index 00000000..1d49af78 --- /dev/null +++ b/Code/GameLogic/RefManager.h @@ -0,0 +1,28 @@ +#ifndef REFMANAGER_H +#define REFMANAGER_H + +#include +#include "Object.h" +#include "PhysicsAPI.h" + +namespace GameLogic +{ + + + + class RefManager + { + public: + RefManager(void); + ~RefManager(void); + + Object* GetMap(Oyster::Physics::ICustomBody *body); + void AddMapping(Oyster::Physics::ICustomBody *body, Object *obj); + + + private: + std::map mapper; //shall be pointer from physics that map to an object + + }; +} +#endif \ No newline at end of file