Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
graph/include/worldmanager.h

31 lines
537 B
C
Raw Normal View History

#pragma once
#include <string>
#include <map>
struct World;
2018-12-27 06:21:29 -05:00
class Renderer;
class WorldManager {
public:
void loadWorld(const std::string& path);
2018-12-27 06:21:29 -05:00
void switchWorld(const std::string& path);
2018-12-27 06:21:29 -05:00
void destructResources(Renderer* renderer);
World* getCurrentWorld() {
return currentWorld;
}
2018-12-27 06:21:29 -05:00
2018-12-19 12:19:52 -05:00
World* getWorld(const std::string& path) {
return loadedWorlds[path];
}
2018-12-27 06:21:29 -05:00
private:
std::map<std::string, World*> loadedWorlds;
World* currentWorld = nullptr;
};
inline WorldManager worldManager;