2019-06-06 17:07:24 +02:00
|
|
|
//
|
|
|
|
// Created by trotfunky on 06/06/19.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "Level.h"
|
2019-06-07 02:59:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|