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