Player
FirstPersonPlayer
Bases: Camera
Manages the first-person player's movement and camera control within the 3D game world.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window_resolution |
Tuple[float, float]
|
The resolution of the window. |
required |
player_parameters |
FirstPersonPlayerParameters
|
The parameters of the first-person player. |
required |
Source code in pynecraft/player.py
keyboard_control(delta_time)
Handles the keyboard input for controlling the player's movement.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
delta_time |
float
|
The time elapsed since the last frame. |
required |
Source code in pynecraft/player.py
mouse_control()
Handles the mouse input for controlling the player's camera orientation.
Source code in pynecraft/player.py
update(delta_time)
Update the player's movement and camera control using the core game logic.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
delta_time |
float
|
The time elapsed since the last frame. |
required |