aboutsummaryrefslogtreecommitdiff
path: root/src/example/scene_manager.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-13 13:10:25 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-13 13:10:25 +0100
commitfac06d488e635583307cd4a916a611500fb64c16 (patch)
treef62f79cc8ba540498d5dfa1deb4379469738a682 /src/example/scene_manager.cpp
parent9d58e897fb68ab8dd001a5085cde2fae4634c274 (diff)
cleanup + fix examples
Diffstat (limited to 'src/example/scene_manager.cpp')
-rw-r--r--src/example/scene_manager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/example/scene_manager.cpp b/src/example/scene_manager.cpp
index f46dc36..5cd7336 100644
--- a/src/example/scene_manager.cpp
+++ b/src/example/scene_manager.cpp
@@ -34,7 +34,8 @@ public:
};
int main() {
- SceneManager & scene_mgr = SceneManager::get_instance();
+ ComponentManager component_mgr{};
+ SceneManager scene_mgr{component_mgr};
// Add the scenes to the scene manager
scene_mgr.add_scene<ConcreteScene1>("scene1");
@@ -45,7 +46,6 @@ int main() {
scene_mgr.load_next_scene();
// Get the Metadata components of each GameObject of Scene1
- ComponentManager & component_mgr = ComponentManager::get_instance();
vector<reference_wrapper<Metadata>> metadata
= component_mgr.get_components_by_type<Metadata>();