mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 23:11:49 +00:00
Small help to code rationality
This commit is contained in:
parent
b0a15a7c8c
commit
b9fff9d1ac
1 changed files with 4 additions and 3 deletions
|
|
@ -86,9 +86,6 @@ void update_controls(PhysicsSolver* physics,
|
||||||
Player* player,
|
Player* player,
|
||||||
float delta){
|
float delta){
|
||||||
|
|
||||||
if (Events::jpressed(GLFW_KEY_ESCAPE)){
|
|
||||||
Window::setShouldClose(true);
|
|
||||||
}
|
|
||||||
if (Events::jpressed(GLFW_KEY_TAB)){
|
if (Events::jpressed(GLFW_KEY_TAB)){
|
||||||
Events::toogleCursor();
|
Events::toogleCursor();
|
||||||
}
|
}
|
||||||
|
|
@ -306,6 +303,10 @@ int main() {
|
||||||
delta = currentTime - lastTime;
|
delta = currentTime - lastTime;
|
||||||
lastTime = currentTime;
|
lastTime = currentTime;
|
||||||
|
|
||||||
|
if (Events::jpressed(GLFW_KEY_ESCAPE)){
|
||||||
|
Window::setShouldClose(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (Events::jpressed(GLFW_KEY_O)){
|
if (Events::jpressed(GLFW_KEY_O)){
|
||||||
occlusion = !occlusion;
|
occlusion = !occlusion;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue