topdownengine.camera Reference¶
Camera
¶
Class that represents the Camera.
Attributes:
| Name | Type | Description |
|---|---|---|
real_position |
Vector2
|
The position of the camera, excluding screenshake. |
screenshake_offset |
Vector2
|
The current screenshake offset. |
focus_game_object |
GameObject
|
The GameObject to center the camera on. |
screenshake |
dict[str, float]
|
Current screenshake dictionary. |
position |
Vector2
|
The position of the camera, factoring screenshake. |
Source code in topdownengine\camera.py
position
property
¶
Get the position of the camera with screenshake.
__init__()
¶
update(dt)
¶
Update the Camera.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dt
|
float
|
The deltatime. |
required |