added SetScreen test

This commit is contained in:
Gulum
2017-10-14 04:02:39 +02:00
parent 9e81340ef8
commit 5041c18a20
4 changed files with 54 additions and 12 deletions

View File

@@ -16,15 +16,22 @@ import com.darkrp2d.input.commands.*;
public class InputHandler implements InputProcessor {
Command testCommand;
Command menuCommand;
public InputHandler() {
public InputHandler(MenuCommand menuCommand) {
testCommand = new TestCommand();
this.menuCommand = menuCommand;
}
@Override
public boolean keyDown(int keycode) {
if(keycode == Input.Keys.Q) {
CommandStream.registerCommand(testCommand);
} else if(keycode == Input.Keys.C) {
CommandStream.registerCommand(menuCommand);
}
return true;
}