Reimplemented the push/pop entity methods in RoomManager

Some accessors in Entity had to be made const, as they were being called
from lambdas with const parameters.
This commit is contained in:
Kayne Ruse
2015-01-02 23:25:59 +11:00
parent 0344fe0d6d
commit d815f17442
6 changed files with 62 additions and 6 deletions
+4
View File
@@ -22,6 +22,7 @@
#ifndef ROOMMANAGER_HPP_
#define ROOMMANAGER_HPP_
#include "entity.hpp"
#include "room_data.hpp"
#include "singleton.hpp"
@@ -42,6 +43,9 @@ public:
void UnloadAll();
void UnloadIf(std::function<bool(std::pair<const int, RoomData const&>)> fn);
void PushEntity(Entity* entity);
void PopEntity(Entity const* entity);
//accessors and mutators
RoomData* Get(int uid);
RoomData* Get(std::string name);