Java 类org.newdawn.slick.command.KeyControl 实例源码

项目:trashjam2017    文件:InputProviderTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    provider = new InputProvider(container.getInput());
    provider.addListener(this);

    provider.bindCommand(new KeyControl(Input.KEY_LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_A), run);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_W), jump);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_SPACE), attack);
    provider.bindCommand(new MouseButtonControl(0), attack);
    provider.bindCommand(new ControllerButtonControl(0, 1), attack);
}
项目:Progetto-C    文件:InputProviderTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    provider = new InputProvider(container.getInput());
    provider.addListener(this);

    provider.bindCommand(new KeyControl(Input.KEY_LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_A), run);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_W), jump);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_SPACE), attack);
    provider.bindCommand(new MouseButtonControl(0), attack);
    provider.bindCommand(new ControllerButtonControl(0, 1), attack);
}
项目:BaseClient    文件:InputProviderTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    provider = new InputProvider(container.getInput());
    provider.addListener(this);

    provider.bindCommand(new KeyControl(Input.KEY_LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_A), run);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_W), jump);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_SPACE), attack);
    provider.bindCommand(new MouseButtonControl(0), attack);
    provider.bindCommand(new ControllerButtonControl(0, 1), attack);
}
项目:GPVM    文件:InputProviderTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    provider = new InputProvider(container.getInput());
    provider.addListener(this);

    provider.bindCommand(new KeyControl(Input.KEY_LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_A), run);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_W), jump);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_SPACE), attack);
    provider.bindCommand(new MouseButtonControl(0), attack);
    provider.bindCommand(new ControllerButtonControl(0, 1), attack);
}
项目:SpaceStationAlpha    文件:InputProviderTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    provider = new InputProvider(container.getInput());
    provider.addListener(this);

    provider.bindCommand(new KeyControl(Input.KEY_LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_A), run);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_W), jump);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_SPACE), attack);
    provider.bindCommand(new MouseButtonControl(0), attack);
    provider.bindCommand(new ControllerButtonControl(0, 1), attack);
}
项目:cretion    文件:InputProviderTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    provider = new InputProvider(container.getInput());
    provider.addListener(this);

    provider.bindCommand(new KeyControl(Input.KEY_LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_A), run);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_W), jump);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_SPACE), attack);
    provider.bindCommand(new MouseButtonControl(0), attack);
    provider.bindCommand(new ControllerButtonControl(0, 1), attack);
}
项目:slick2d-maven    文件:InputProviderTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    provider = new InputProvider(container.getInput());
    provider.addListener(this);

    provider.bindCommand(new KeyControl(Input.KEY_LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_A), run);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.LEFT), run);
    provider.bindCommand(new KeyControl(Input.KEY_UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_W), jump);
    provider.bindCommand(new ControllerDirectionControl(0, ControllerDirectionControl.UP), jump);
    provider.bindCommand(new KeyControl(Input.KEY_SPACE), attack);
    provider.bindCommand(new MouseButtonControl(0), attack);
    provider.bindCommand(new ControllerButtonControl(0, 1), attack);
}