aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Scene.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-14 14:38:25 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-14 14:38:25 +0100
commit93f0951738d3ac7b0249b5064c3ee7b6270eeb3a (patch)
tree639c91c9cd97be603760301476f884f46be69013 /src/crepe/api/Scene.cpp
parentaa1f1f9460fa713e00fd1830b08be743395110ce (diff)
parent876896e50711509e80ef551b4e8ad440e8039b97 (diff)
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/text-component
Diffstat (limited to 'src/crepe/api/Scene.cpp')
-rw-r--r--src/crepe/api/Scene.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/crepe/api/Scene.cpp b/src/crepe/api/Scene.cpp
new file mode 100644
index 0000000..ad729d2
--- /dev/null
+++ b/src/crepe/api/Scene.cpp
@@ -0,0 +1,15 @@
+#include "Scene.h"
+
+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);
+}