Module ggez_goodies::scene
[−]
[src]
The Scene system is basically for transitioning between completely different states that have entirely different game loops and but which all share a state. It operates as a stack, with new scenes getting pushed to the stack (while the old ones stay in memory unchanged). Apparently this is basically a push-down automata.
Also there's no reason you can't have a Scene contain its own Scene subsystem to do its own indirection. With a different state type, as well! What fun! Though whether you want to go that deep down the rabbit-hole is up to you. I haven't found it necessary yet.
This is basically identical in concept to the Amethyst engine's scene system, the only difference is the details of how the pieces are put together.
Structs
SceneStack |
A stack of |
Enums
SceneSwitch |
A command to change to a new scene, either by pushign a new one, popping one or replacing the current scene (pop and then push). |
Traits
Scene |
A trait for you to implement on a scene.
Defines the callbacks the scene uses:
a common context type |