Skip to content

Commit 1e84fc9

Browse files
committed
fixed alis code :)
1 parent 68a2f3c commit 1e84fc9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/javagameengine/backend/input/Input.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,22 @@ public static boolean isKeyPressed(int keyCode){
9494
return pressed;
9595
}
9696

97-
public static getHorizontal()
97+
public static int getHorizontal()
9898
{
9999
if(isKeyDown(Keys.D))
100-
return 1
100+
return 1;
101101
if(isKeyDown(Keys.A))
102-
return -1
102+
return -1;
103+
return 0;
103104
}
104105

105-
public static getVertical()
106+
public static int getVertical()
106107
{
107108
if(isKeyDown(Keys.W))
108-
return 1
109+
return 1;
109110
if(isKeyDown(Keys.S))
110-
return -1
111+
return -1;
112+
return 0;
111113
}
112114

113115

0 commit comments

Comments
 (0)