mirror of
https://github.com/Klagarge/PokeHES.git
synced 2025-11-01 11:59:17 +00:00
polish and bug fix
This commit is contained in:
26
src/Control/Keyboard.java
Normal file
26
src/Control/Keyboard.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package Control;
|
||||
|
||||
import com.badlogic.gdx.Input;
|
||||
|
||||
import Screen.ScreenPlayer;
|
||||
|
||||
public class Keyboard {
|
||||
public void keyDown(int keycode, ScreenPlayer sp, Controller c) {
|
||||
switch (keycode) {
|
||||
case Input.Keys.Z:
|
||||
if (sp.sm.zoom == 1.0) {
|
||||
sp.sm.zoom = 0.5f;
|
||||
} else {
|
||||
sp.sm.zoom = 1;
|
||||
}
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
c.keyStatus.put(keycode, true);
|
||||
}
|
||||
public void onKeyUp(int keycode, ScreenPlayer sp, Controller c) {
|
||||
c.keyStatus.put(keycode, false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user