added isKeyDown Class for keyboard input
This commit is contained in:
parent
69cfdadf85
commit
282a8b0283
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/.idea/
|
/.idea/
|
||||||
/.gitignore
|
/.gitignore
|
||||||
/jeu-de-combat.iml
|
/jeu-de-combat.iml
|
||||||
|
/target/
|
||||||
|
@ -19,4 +19,8 @@ public class Input extends GLFWKeyCallback {
|
|||||||
if (glGetInteger(GL_POLYGON_MODE) == GL_FILL) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
if (glGetInteger(GL_POLYGON_MODE) == GL_FILL) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||||
else glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
else glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||||
}
|
}
|
||||||
|
public static boolean isKeyDown(int keyCode) {
|
||||||
|
return glfwGetKey(Engine.getWindow(), keyCode) == 1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user