builder
builder copied to clipboard
Scene support
Basics
-
Each game contains one or more scenes.
-
Each scene contains one or more backdrops
Multiple backdrops support (in one scene) is mainly for backward compatibility, and not recommended in most cases
-
Each scene contains zero or more sprites
-
Each scene contains zero or more widgets
-
Each scene contains its own map-size setting
-
Each scene contains its own script / code
Existed Problems
-
How to support "Each scene contains its own script / code"
-
Scene-related APIs
- class
Scene& coresponding classfile - Scene related events
- class
-
What happens when scene switched
-
Common use cases with scene
- Keep sprite state
- Data passing among scenes