All About Scenes¶
Scenes are the terrain where sprites act. Each game has multiple scenes and may transition at any time.
-
class
ppb.
BaseScene
(*, set_up: Callable = None, **props)[source]¶ -
background_color
= (0, 0, 100)¶ An RGB triple of the background, eg
(0, 127, 255)
-
main_camera
¶ An object representing the view of the scene that’s rendered
-
camera_class
¶ alias of
ppb.camera.Camera
-
sprite_layers
() → Iterator[T_co][source]¶ Return an iterator of the contained Sprites in ascending layer order.
Sprites are part of a layer if they have a layer attribute equal to that layer value. Sprites without a layer attribute are considered layer 0.
This function exists primarily to assist the Renderer subsystem, but will be left public for other creative uses.
-