Entities are now constructable
Added utility function to display error window Added textures Added font Added a way to choose resources location
This commit is contained in:
parent
46d26b6e61
commit
3666b9e7e9
17 changed files with 155 additions and 39 deletions
|
@ -14,17 +14,24 @@ Level::Level(const pugi::xml_document& xmlDoc, const TextureStore& textureStore)
|
|||
{
|
||||
if(!strncmp(child.name(),"Entity",6))
|
||||
{
|
||||
entities.emplace_back(child);
|
||||
entities.emplace_back(child,textures.at(child.attribute("textureId").as_int(0)).get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Level::render(sf::RenderWindow& renderWindow) const
|
||||
{
|
||||
|
||||
for(const Entity& entity : entities)
|
||||
{
|
||||
renderWindow.draw(entity.getShape());
|
||||
}
|
||||
}
|
||||
|
||||
void Level::runStep() const
|
||||
void Level::runStep()
|
||||
{
|
||||
|
||||
for(Entity& entity: entities)
|
||||
{
|
||||
// FIXME : For testing purposes
|
||||
entity.move();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue