roguish/levelmanager.hpp

32 lines
638 B
C++

#pragma once
#include "dinkyecs.hpp"
#include "lights.hpp"
#include "map.hpp"
#include <vector>
#include <memory>
#include "spatialmap.hpp"
struct GameLevel {
size_t index;
std::shared_ptr<Map> map;
std::shared_ptr<DinkyECS::World> world;
std::shared_ptr<lighting::LightRender> lights;
std::shared_ptr<SpatialMap> collision;
};
class LevelManager {
public:
std::vector<GameLevel> $levels;
size_t $current_level = 0;
LevelManager();
size_t create_level();
GameLevel &next();
GameLevel &previous();
GameLevel &current();
size_t current_index() { return $current_level; }
GameLevel &get(size_t index);
};