diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-11 22:01:53 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-11 22:01:53 +0100 |
commit | f06be6004ec8b47e3b4b1ba4fda068b365923683 (patch) | |
tree | 26376513f8a52386e6127af324aa65177b620620 /src/doc/feature/scene.dox | |
parent | a6803980f1e74ecf1abb007b7c77f00d2cd92c43 (diff) |
update doxygen documentation w/ updated APIloek/doxygen
Diffstat (limited to 'src/doc/feature/scene.dox')
-rw-r--r-- | src/doc/feature/scene.dox | 15 |
1 files changed, 6 insertions, 9 deletions
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 <crepe/api/LoopManager.h> -#include <crepe/api/GameObject.h> +#include <crepe/api/Engine.h> #include <crepe/api/Scene.h> -#include <crepe/types.h> 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<MyScene>(); + foo.add_scene<MyScene>(); - loop_mgr.start(); + return foo.main(); } ``` |