topdownengine.scenes Reference¶
BaseScene
¶
A scene that determines the behavior of the game loop.
Attributes:
| Name | Type | Description |
|---|---|---|
game |
Game
|
The game object to use. |
ui_containers |
list[UIContainer]
|
The list of UIContainers for this scene. |
Source code in topdownengine\scenes.py
GameplayScene
¶
Bases: BaseScene
A scene that updates and renders all GameObject instances.
Attributes:
| Name | Type | Description |
|---|---|---|
global_alpha |
int
|
The global alpha for lighting. |
Source code in topdownengine\scenes.py
__init__(game)
¶
Initialize the GameplayScene.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
game
|
Game
|
The game object to use. |
required |
handle_event(event)
¶
Handle a single event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
|
Event
|
The event to handle. |
required |
render()
¶
Render the GameplayScene.