Added creatures to the room containers

This commit is contained in:
2016-03-25 22:29:26 +11:00
parent 18f119224a
commit 9a1714a881
8 changed files with 40 additions and 27 deletions
+11 -5
View File
@@ -43,10 +43,10 @@ void RoomData::RunFrame() {
}
//update the entities in the room
creatureMgr.Update();
for (auto& it : characterList) {
it->Update();
}
//TODO: (3) iterate through the monster map
//TODO: (3) trigger script for monsters
//build a list of game entities
@@ -100,6 +100,8 @@ void RoomData::RunFrame() {
//next
entityStack.pop();
}
//TODO: creature/character collisions
}
std::string RoomData::SetName(std::string s) {
@@ -118,6 +120,14 @@ std::string RoomData::GetTileset() {
return tilesetName;
}
std::list<CharacterData*>* RoomData::GetCharacterList() {
return &characterList;
}
CreatureManager* RoomData::GetCreatureMgr() {
return &creatureMgr;
}
RegionPagerLua* RoomData::GetPager() {
return &pager;
}
@@ -126,10 +136,6 @@ TriggerManager* RoomData::GetTriggerMgr() {
return &triggerMgr;
}
std::list<CharacterData*>* RoomData::GetCharacterList() {
return &characterList;
}
lua_State* RoomData::SetLuaState(lua_State* L) {
lua = L;
pager.SetLuaState(lua);