refactor and cleanup player controller

This commit is contained in:
MihailRis
2024-07-08 19:43:13 +03:00
parent 487ba84517
commit 3cd0261f3b
8 changed files with 21 additions and 13 deletions
+7 -2
View File
@@ -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();