From f06be6004ec8b47e3b4b1ba4fda068b365923683 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sat, 11 Jan 2025 22:01:53 +0100 Subject: update doxygen documentation w/ updated API --- src/doc/feature/scene.dox | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/doc/feature/scene.dox') diff --git a/src/doc/feature/scene.dox b/src/doc/feature/scene.dox index 4124e37..b680eec 100644 --- a/src/doc/feature/scene.dox +++ b/src/doc/feature/scene.dox @@ -40,31 +40,28 @@ added to the loop/scene manger via loop_mgr::add_scene<>(). The templated argument should define the concrete scene to be added. ```cpp -#include -#include +#include #include -#include using namespace crepe; class MyScene : public Scene { public: void load_scene() { - ComponentManager & mgr = this->component_manager; - GameObject object1 = mgr.new_object("object1", "tag_my_scene", vec2{0, 0}, 0, 1); - GameObject object2 = mgr.new_object("object2", "tag_my_scene", vec2{1, 0}, 0, 1); + GameObject object1 = new_object("object1", "tag_my_scene", vec2{0, 0}, 0, 1); + GameObject object2 = new_object("object2", "tag_my_scene", vec2{1, 0}, 0, 1); } string get_name() const { return "my_scene"; } }; int main() { - LoopManager loop_mgr; + Engine foo; // Add the scenes to the loop manager - loop_mgr.add_scene(); + foo.add_scene(); - loop_mgr.start(); + return foo.main(); } ``` -- cgit v1.2.3