We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68a2f3c commit 1e84fc9Copy full SHA for 1e84fc9
src/javagameengine/backend/input/Input.java
@@ -94,20 +94,22 @@ public static boolean isKeyPressed(int keyCode){
94
return pressed;
95
}
96
97
- public static getHorizontal()
+ public static int getHorizontal()
98
{
99
if(isKeyDown(Keys.D))
100
- return 1
+ return 1;
101
if(isKeyDown(Keys.A))
102
- return -1
+ return -1;
103
+ return 0;
104
105
- public static getVertical()
106
+ public static int getVertical()
107
108
if(isKeyDown(Keys.W))
109
110
if(isKeyDown(Keys.S))
111
112
113
114
115
0 commit comments