#include // // Created by trotfunky on 06/06/19. // #include "Game.h" Game::Game(const std::vector& levels, const std::vector& textures) { loadTextures(); } void Game::loadLevel(int levelId) { pugi::xml_document document; pugi::xml_parse_result result = document.load_file(levelFiles.at(levelId).c_str()); if(!result) { std::cerr << "Error while loading level :\n" << "\t" << result.description() << std::endl; exit(-1); } currentLevel = std::make_unique(document,textures); } void Game::loadTextures() { textures.reserve(textureFiles.size()); for(const std::string& filePath : textureFiles) { textures.emplace_back(std::make_unique()); textures.back()->loadFromFile(filePath); } } void Game::runGame() { }