Package org.seattlegamer.spacegame.core

Examples of org.seattlegamer.spacegame.core.Input


  @Test
  public void keyPressesAreRecordedCorrectly() {
   
    int keyCode = KeyEvent.VK_SPACE;
   
    Input input = new Input();
    assertFalse(input.isKeyInputActive(keyCode));
    input.keyPressed(getMockKeyEvent(keyCode));
    assertTrue(input.isKeyInputActive(keyCode));

  }
View Full Code Here


  @Test
  public void keyReleasesAreRecordedCorrectly() {
   
    int keyCode = KeyEvent.VK_SPACE;

    Input input = new Input();
    input.keyPressed(getMockKeyEvent(keyCode));
    assertTrue(input.isKeyInputActive(keyCode));
    input.keyReleased(getMockKeyEvent(keyCode));
    assertFalse(input.isKeyInputActive(keyCode));
   
  }
View Full Code Here

  public @Bean PointerInput pointerInput() {
    return input();
  }
 
  public @Bean Input input() {
    return new Input();
  }
View Full Code Here

TOP

Related Classes of org.seattlegamer.spacegame.core.Input

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.