Skip to content

Create a scene

Julien Tauran edited this page Dec 27, 2018 · 5 revisions

A scene is defined as an object named "bs_scene_t", it will contains all components. To create it you will have to choose an id, each id must be unique.

bs_scene_t *scene = bs_scene_create("my custom id");

Now that you have your scene, you can add components and attach events to it.
To attach events: click here
To add components: click here

The scenes also support a tick system. A tick means the number of times the scene has been rendered. It can be useful to have a link with the time elapsed.
Once you have your scene ready, you will have to add it to a frame.

bs_scene_add_to_frame(frame, scene);
Clone this wiki locally