diff options
Diffstat (limited to 'src/crepe/api/SceneManager.cpp')
-rw-r--r-- | src/crepe/api/SceneManager.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/crepe/api/SceneManager.cpp b/src/crepe/api/SceneManager.cpp index dfed6ee..4a38787 100644 --- a/src/crepe/api/SceneManager.cpp +++ b/src/crepe/api/SceneManager.cpp @@ -8,10 +8,7 @@ using namespace crepe; using namespace std; -SceneManager & SceneManager::get_instance() { - static SceneManager instance; - return instance; -} +SceneManager::SceneManager(ComponentManager & mgr) : component_manager(mgr) {} void SceneManager::set_next_scene(const string & name) { next_scene = name; } @@ -30,7 +27,7 @@ void SceneManager::load_next_scene() { unique_ptr<Scene> & scene = *it; // Delete all components of the current scene - ComponentManager & mgr = ComponentManager::get_instance(); + ComponentManager & mgr = this->component_manager; mgr.delete_all_components(); // Load the new scene |