Skip to content
Snippets Groups Projects
Commit 960a534e authored by JonShard's avatar JonShard
Browse files

Added toggeling of day and season moving bools.

parent fd6a6035
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,8 @@ class Input
private:
static bool m_leftButtonDown;
static bool m_rightButtonDown;
static bool m_dayMoving;
static bool m_seasonMoving;
public:
static float m_fovy; // The camera's field of view on Y axis. Used for zoom.
......
......@@ -5,6 +5,8 @@ namespace overkill
{
bool Input::m_leftButtonDown = false;
bool Input::m_rightButtonDown = false;
bool Input::m_dayMoving = true;
bool Input::m_seasonMoving = true;
float Input::m_fovy = C::FOV;
float Input::m_cursorX = 0;
......@@ -85,7 +87,10 @@ namespace overkill
}
// PRESS 5 TO Set toggle season changing.
else if(keyCode == GLFW_KEY_5) {
// toggle season change
if (m_seasonMoving)
m_seasonMoving = false;
else
m_seasonMoving = true;
}
// PRESS 6 TO change daytime to morning.
......@@ -106,7 +111,10 @@ namespace overkill
}
// PRESS 0 TO toggle daytime changing.
else if(keyCode == GLFW_KEY_0) {
if (m_dayMoving)
m_dayMoving = false;
else
m_dayMoving = true;
}
......@@ -209,10 +217,10 @@ namespace overkill
m_navKeyPressed[Y] = false;
break;
case GLFW_KEY_N:
m_navKeyPressed[N] = false;
break;
case GLFW_KEY_M:
m_navKeyPressed[M] = false;
m_navKeyPressed[N] = false/ PRESS SHIFT + 4 TO RELOAD Scene;
break; else if(keyCode == GLFW_KEY_4 && mods == GLFW_MOD_SHIFT) {
case GLFW_KEY_M: Scene::reload();
m_navKeyPressed[M] = false };
break;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment