mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 23:11:49 +00:00
Controllers minor refactor
This commit is contained in:
parent
856f5879f1
commit
73d87ae451
2 changed files with 1 additions and 7 deletions
|
|
@ -126,7 +126,7 @@ void PlayerController::update(float delta, bool input, bool pause) {
|
||||||
updateControls(delta);
|
updateControls(delta);
|
||||||
|
|
||||||
}
|
}
|
||||||
refreshCamera();
|
camControl.refresh();
|
||||||
if (input) {
|
if (input) {
|
||||||
updateInteraction();
|
updateInteraction();
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -179,10 +179,6 @@ void PlayerController::updateControls(float delta){
|
||||||
player->update(level, input, delta);
|
player->update(level, input, delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerController::refreshCamera() {
|
|
||||||
camControl.refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayerController::updateInteraction(){
|
void PlayerController::updateInteraction(){
|
||||||
const ContentIndices* contentIds = level->contentIds;
|
const ContentIndices* contentIds = level->contentIds;
|
||||||
Chunks* chunks = level->chunks;
|
Chunks* chunks = level->chunks;
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,9 @@ class PlayerController {
|
||||||
|
|
||||||
void updateKeyboard();
|
void updateKeyboard();
|
||||||
void updateCamera(float delta, bool movement);
|
void updateCamera(float delta, bool movement);
|
||||||
void refreshCamera();
|
|
||||||
void resetKeyboard();
|
void resetKeyboard();
|
||||||
void updateControls(float delta);
|
void updateControls(float delta);
|
||||||
void updateInteraction();
|
void updateInteraction();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static glm::vec3 selectedBlockPosition;
|
static glm::vec3 selectedBlockPosition;
|
||||||
static int selectedBlockId;
|
static int selectedBlockId;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue