mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Controllers minor refactor
This commit is contained in:
parent
c0050cffaa
commit
856f5879f1
4 changed files with 28 additions and 22 deletions
|
|
@ -23,22 +23,7 @@ void LevelController::update(
|
|||
float delta,
|
||||
bool input,
|
||||
bool pause) {
|
||||
if (!pause) {
|
||||
if (input) {
|
||||
player->updateKeyboard();
|
||||
} else {
|
||||
player->resetKeyboard();
|
||||
}
|
||||
player->updateCamera(delta, input);
|
||||
player->updateControls(delta);
|
||||
|
||||
}
|
||||
player->refreshCamera();
|
||||
if (input) {
|
||||
player->updateInteraction();
|
||||
} else {
|
||||
player->selectedBlockId = -1;
|
||||
}
|
||||
player->update(delta, input, pause);
|
||||
level->update();
|
||||
chunks->update(settings.chunks.loadSpeed);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue