added SetScreen test
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user