Started object construction and parsing
Simplified some structures Missing : Entity construction
This commit is contained in:
parent
67435debe6
commit
46d26b6e61
10 changed files with 146 additions and 5 deletions
|
@ -3,3 +3,28 @@
|
|||
//
|
||||
|
||||
#include "Level.h"
|
||||
|
||||
|
||||
Level::Level(const pugi::xml_document& xmlDoc, const TextureStore& textureStore)
|
||||
: textures(textureStore),
|
||||
size(xmlDoc.child("Level").attribute("width").as_int(),xmlDoc.child("Level").attribute("width").as_int())
|
||||
{
|
||||
pugi::xml_node levelNode = xmlDoc.child("Level");
|
||||
for(const pugi::xml_node& child : levelNode.children())
|
||||
{
|
||||
if(!strncmp(child.name(),"Entity",6))
|
||||
{
|
||||
entities.emplace_back(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Level::render(sf::RenderWindow& renderWindow) const
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Level::runStep() const
|
||||
{
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue