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

28 lines
488 B
C
Raw Normal View History

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