initial project

This commit is contained in:
Gulum
2017-10-13 18:55:50 +02:00
commit 9e81340ef8
19 changed files with 728 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.darkrp2d.input;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.InputProcessor;
import com.darkrp2d.input.commands.*;
/**
*
* @author gulum
*/
public class InputHandler implements InputProcessor {
Command testCommand;
public InputHandler() {
testCommand = new TestCommand();
}
@Override
public boolean keyDown(int keycode) {
if(keycode == Input.Keys.Q) {
CommandStream.registerCommand(testCommand);
}
return true;
}
@Override
public boolean keyUp(int keycode) {
return false;
}
@Override
public boolean keyTyped(char character) {
return false;
}
@Override
public boolean touchDown(int screenX, int screenY, int pointer, int button) {
return false;
}
@Override
public boolean touchUp(int screenX, int screenY, int pointer, int button) {
return false;
}
@Override
public boolean touchDragged(int screenX, int screenY, int pointer) {
return false;
}
@Override
public boolean mouseMoved(int screenX, int screenY) {
return false;
}
@Override
public boolean scrolled(int amount) {
return false;
}
}