Skip to content

Scene Other Events

CleanupEvent

CleanupEvent(engine: Engine)

Bases: SceneEvent

Dispatched when the scene is about to clean up.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

scene property

scene: Scene

The active scene that dispatched this event.

FirstEvent

FirstEvent(engine: Engine)

Bases: SceneEvent

Dispatched when the scene is about to begin the game loop.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

scene property

scene: Scene

The active scene that dispatched this event.

FixedUpdateEvent

FixedUpdateEvent(engine: Engine)

Bases: SceneEvent

Dispatched when the scene is about to run the fixed update cycle.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

scene property

scene: Scene

The active scene that dispatched this event.

InitEvent

InitEvent(engine: Engine)

Bases: SceneEvent

Dispatched when the scene is about to run the developer-defined initializer.

args property

args: Any

The arguments associated with this scene's loading.

kwargs property

kwargs: dict[str, Any]

The keyword-arguments associated with this scene's loading.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

scene property

scene: Scene

The active scene that dispatched this event.

UserEvent

UserEvent(engine: Engine)

Bases: SceneEvent, CancellableEvent

Dispatched when the scene recognizes that a custom, developer-defined event has been fired.

event property

event: PygameEvent

The custom, developer-defined event fired by Pygame.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

cancel

cancel() -> None

Cancel this event from being further handled.

RenderEvent

RenderEvent(engine: Engine)

Bases: SceneEvent

Dispatched when the engine flags your plugin to render.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

scene property

scene: Scene

The active scene that dispatched this event.

UpdateEvent

UpdateEvent(engine: Engine)

Bases: SceneEvent

Dispatched when the engine flags your plugin to update.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

scene property

scene: Scene

The active scene that dispatched this event.