You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
786 B
39 lines
786 B
#pragma once
|
|
|
|
#include "dinkyecs.hpp"
|
|
#include "lights.hpp"
|
|
#include "map.hpp"
|
|
#include <vector>
|
|
#include <memory>
|
|
#include "spatialmap.hpp"
|
|
|
|
using std::shared_ptr;
|
|
|
|
struct GameLevel {
|
|
size_t index;
|
|
shared_ptr<Map> map;
|
|
shared_ptr<DinkyECS::World> world;
|
|
shared_ptr<lighting::LightRender> lights;
|
|
shared_ptr<SpatialMap> collision;
|
|
};
|
|
|
|
struct LevelScaling {
|
|
int map_width=40;
|
|
int map_height=50;
|
|
};
|
|
|
|
class LevelManager {
|
|
public:
|
|
std::vector<GameLevel> $levels;
|
|
size_t $current_level = 0;
|
|
|
|
LevelManager();
|
|
|
|
size_t create_level(shared_ptr<DinkyECS::World> prev_world = nullptr);
|
|
GameLevel &next();
|
|
GameLevel &previous();
|
|
GameLevel ¤t();
|
|
size_t current_index() { return $current_level; }
|
|
GameLevel &get(size_t index);
|
|
LevelScaling scale_level();
|
|
};
|
|
|