diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-13 20:47:57 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-13 20:47:57 +0100 |
commit | c4c5758061c817784743af07271445905d62dfdd (patch) | |
tree | e86a363cdbb878ef5a75c7167a5b01b83868a97f /src | |
parent | 374cdf9b14e372e85c7a88c0b994146b34977193 (diff) |
moved code to cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/crepe/api/Scene.cpp | 10 | ||||
-rw-r--r-- | src/crepe/api/Scene.h | 19 |
2 files changed, 14 insertions, 15 deletions
diff --git a/src/crepe/api/Scene.cpp b/src/crepe/api/Scene.cpp index 5117766..9a2a1bc 100644 --- a/src/crepe/api/Scene.cpp +++ b/src/crepe/api/Scene.cpp @@ -3,3 +3,13 @@ using namespace crepe; SaveManager & Scene::get_save_manager() const { return mediator->save_manager; } + +GameObject Scene::new_object(const std::string & name, const std::string & tag, const vec2 & position, double rotation, double scale) { + // Forward the call to ComponentManager's new_object method + return mediator->component_manager->new_object(name, tag, position, rotation, scale); +} + + +void Scene::set_persistent(const Asset & asset, bool persistent) { + mediator->resource_manager->set_persistent(asset, persistent); +} diff --git a/src/crepe/api/Scene.h b/src/crepe/api/Scene.h index cba4e10..e70d9ba 100644 --- a/src/crepe/api/Scene.h +++ b/src/crepe/api/Scene.h @@ -68,23 +68,12 @@ protected: */ SaveManager & get_save_manager() const; - /** - * \copydoc ComponentManager::new_object - */ - GameObject new_object(const std::string & name, const std::string & tag = "", - const vec2 & position = {0, 0}, double rotation = 0, - double scale = 1) { - // Forward the call to ComponentManager's new_object method - return mediator->component_manager->new_object(name, tag, position, rotation, scale); - } + //! \copydoc ComponentManager::new_object + GameObject new_object(const std::string & name, const std::string & tag = "", const vec2 & position = {0, 0}, double rotation = 0, double scale = 1); - /** - * \copydoc ResourceManager::set_persistent - */ - void set_persistent(const Asset & asset, bool persistent) { - mediator->resource_manager->set_persistent(asset, persistent); - } + //! \copydoc ResourceManager::set_persistent + void set_persistent(const Asset & asset, bool persistent); /** * \name Logging functions * \see Log |