mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
refactor and cleanup player controller
This commit is contained in:
parent
487ba84517
commit
3cd0261f3b
8 changed files with 21 additions and 13 deletions
|
|
@ -239,11 +239,16 @@ void PlayerController::update(float delta, bool input, bool pause) {
|
|||
} else {
|
||||
resetKeyboard();
|
||||
}
|
||||
updatePlayer(delta);
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerController::postUpdate(float delta, bool input, bool pause) {
|
||||
if (!pause) {
|
||||
updateFootsteps(delta);
|
||||
updateCamera(delta, input);
|
||||
updatePlayer(delta);
|
||||
|
||||
}
|
||||
player->postUpdate(this->input, delta);
|
||||
camControl.refresh();
|
||||
if (input) {
|
||||
updateInteraction();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue