Package org.newdawn.slick.command

Examples of org.newdawn.slick.command.KeyControl


   */
  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);
  }
View Full Code Here

TOP

Related Classes of org.newdawn.slick.command.KeyControl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.