diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-11-05 16:42:57 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-11-05 16:42:57 +0100 |
commit | bf4c172f2709adf5a6f210bae60e16972e8decad (patch) | |
tree | 2a868f7375b8e750a38b55788beeae9989bb0c61 | |
parent | 9752e2d27b06db25f0e2bc170341901201b4e4c1 (diff) |
Make format
-rw-r--r-- | src/crepe/api/SceneManager.cpp | 4 | ||||
-rw-r--r-- | src/crepe/api/SceneManager.h | 2 | ||||
-rw-r--r-- | src/example/scene_manager.cpp | 15 |
3 files changed, 10 insertions, 11 deletions
diff --git a/src/crepe/api/SceneManager.cpp b/src/crepe/api/SceneManager.cpp index 1680dd1..c8061c9 100644 --- a/src/crepe/api/SceneManager.cpp +++ b/src/crepe/api/SceneManager.cpp @@ -12,9 +12,7 @@ SceneManager & SceneManager::get_instance() { } // Push the next scene onto the queue -void SceneManager::load_scene(std::string name) { - next_scene.push(name); -} +void SceneManager::load_scene(std::string name) { next_scene.push(name); } // Load a new scene from the queue (if there is one) void SceneManager::empty_queue() { diff --git a/src/crepe/api/SceneManager.h b/src/crepe/api/SceneManager.h index 76fe92e..87db8d7 100644 --- a/src/crepe/api/SceneManager.h +++ b/src/crepe/api/SceneManager.h @@ -1,8 +1,8 @@ #pragma once -#include <vector> #include <memory> #include <queue> +#include <vector> #include "Scene.h" diff --git a/src/example/scene_manager.cpp b/src/example/scene_manager.cpp index 499a727..f1fe86a 100644 --- a/src/example/scene_manager.cpp +++ b/src/example/scene_manager.cpp @@ -1,10 +1,10 @@ #include <iostream> -#include "../crepe/api/SceneManager.h" -#include "../crepe/api/Scene.h" -#include "../crepe/api/GameObject.h" -#include "../crepe/Metadata.h" #include "../crepe/ComponentManager.h" +#include "../crepe/Metadata.h" +#include "../crepe/api/GameObject.h" +#include "../crepe/api/Scene.h" +#include "../crepe/api/SceneManager.h" using namespace crepe; using namespace std; @@ -46,8 +46,9 @@ int main() { // 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>(); - + vector<reference_wrapper<Metadata>> metadata + = component_mgr.get_components_by_type<Metadata>(); + cout << "Metadata components of Scene1:" << endl; // Print the Metadata for (auto & m : metadata) { @@ -62,7 +63,7 @@ int main() { // Get the Metadata components of each GameObject of Scene2 metadata = component_mgr.get_components_by_type<Metadata>(); - + cout << "Metadata components of Scene2:" << endl; // Print the Metadata for (auto & m : metadata) { |