diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-03 20:47:44 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-03 20:47:44 +0100 |
commit | 41f9352ec236bbd0035644d983d9a2402bb8326f (patch) | |
tree | 9fa16f5e46128b273dc9780040cc5146d2978656 /src/doc/feature | |
parent | cc821016c8ddce45a1e3f192415f58be237b8a1e (diff) |
wrap lines
Diffstat (limited to 'src/doc/feature')
-rw-r--r-- | src/doc/feature/scene.dox | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/src/doc/feature/scene.dox b/src/doc/feature/scene.dox index d81df4c..4124e37 100644 --- a/src/doc/feature/scene.dox +++ b/src/doc/feature/scene.dox @@ -6,10 +6,11 @@ namespace crepe { \ingroup feature \brief User-defined scenes -Scenes can be used to implement game environments, and allow arbitrary game objects to be organized -as part of the game structure. Scenes are implemented as derivative classes of Scene, which are -added to the game using the SceneManager. Scenes describe the start of a Scene and cannot modify -GameObjects during runtime of a Scene (use \ref feature_script "Scripting" for this purpose). +Scenes can be used to implement game environments, and allow arbitrary game +objects to be organized as part of the game structure. Scenes are implemented as +derivative classes of Scene, which are added to the game using the SceneManager. +Scenes describe the start of a Scene and cannot modify GameObjects during +runtime of a Scene (use \ref feature_script for this purpose). \see SceneManager \see GameObject @@ -18,19 +19,25 @@ GameObjects during runtime of a Scene (use \ref feature_script "Scripting" for t \par Example -This example demonstrates how to define and add scenes to the loop/scene manager in the `crepe` framework. -Each concrete scene should be derived from Scene. In the example below, the concrete scene is named MyScene. -A concrete scene should, at least, implement (override) two methods, namely load_scene() and get_name(). The -scene is build (using GameObjects) in the load_scene() method. GameObjects should be made using the -component_manager::new_object(). In the example below, two GameObjects (named object1 and object2) are added -to MyScene. object1 and object2 do not have any non-default Components attached to them, however, if needed, -this should also be done in load_scene(). Each concrete scene must have a unique name. This unique name is -used to load a new concrete scene (via a Script). The unique name is set using the get_name() method. In the -example below, MyScene's unique name is my_scene. -After setting up one or more concrete scene(s), the concrete scene(s) should be added to the loop/scene manager. -This is done in your main(). Firstly, the LoopManager should be instantiated. Than, all the concrete scene(s) -should be added to the loop/scene manger via loop_mgr::add_scene<>(). The templated argument should define the -concrete scene to be added. +This example demonstrates how to define and add scenes to the loop/scene manager +in the `crepe` framework. Each concrete scene should be derived from Scene. In +the example below, the concrete scene is named MyScene. A concrete scene should, +at least, implement (override) two methods, namely load_scene() and get_name(). +The scene is build (using GameObjects) in the load_scene() method. GameObjects +should be made using the component_manager::new_object(). + +In the example below, two GameObjects (named object1 and object2) are added to +MyScene. object1 and object2 do not have any non-default Components attached to +them, however, if needed, this should also be done in load_scene(). Each +concrete scene must have a unique name. This unique name is used to load a new +concrete scene (via a Script). The unique name is set using the get_name() +method. In the example below, MyScene's unique name is my_scene. + +After setting up one or more concrete scene(s), the concrete scene(s) should be +added to the loop/scene manager. This is done in your main(). Firstly, the +LoopManager should be instantiated. Than, all the concrete scene(s) should be +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> |