Added utility function to display error window Added textures Added font Added a way to choose resources location
34 lines
592 B
C++
34 lines
592 B
C++
//
|
|
// Created by trotfunky on 06/06/19.
|
|
//
|
|
|
|
#ifndef SRC_LEVEL_H
|
|
#define SRC_LEVEL_H
|
|
|
|
#include <SFML/Graphics.hpp>
|
|
#include <pugixml.hpp>
|
|
#include <vector>
|
|
#include <cstring>
|
|
|
|
#include "Utils.h"
|
|
#include "Entity.h"
|
|
|
|
using TextureStore = std::vector<std::unique_ptr<sf::Texture>>;
|
|
|
|
class Level {
|
|
public:
|
|
Level(const pugi::xml_document& xmlDoc, const TextureStore& textureStore);
|
|
|
|
void render(sf::RenderWindow& renderWindow) const;
|
|
void runStep();
|
|
|
|
private:
|
|
const sf::Vector2i size;
|
|
|
|
std::vector<Entity> entities;
|
|
|
|
const TextureStore& textures;
|
|
};
|
|
|
|
|
|
#endif //SRC_LEVEL_H
|