Package org.seattlegamer.spacegame.messages

Examples of org.seattlegamer.spacegame.messages.StateChange


  }
 
  @Subscription
  public void startNewGame(NewGameManifest manifest) throws IOException {
    this.gameState.loadNewGame(manifest);
    this.bus.broadcast(new StateChange(GameState.class));
  }
View Full Code Here


    if(keyInput.isKeyInputActive(KeyEvent.VK_ENTER)) {
      this.bus.broadcast(new MenuExecution(this.selectionIndex));
    }

    if(keyInput.isKeyInputActive(KeyEvent.VK_ESCAPE)) {
      this.bus.broadcast(new StateChange(GameState.class));
    }

  }
View Full Code Here

    Collection<State> states = new LinkedList<State>();
    states.add(gameState());
    states.add(menuState());
    StateManager stateManager = new StateManager(states);
    bus.register(stateManager, null);
    bus.broadcast(new StateChange(MenuState.class));
    return stateManager;

  }
View Full Code Here

  @Override
  public void update(KeyInput keyInput, PointerInput pointerInput, long elapsedMillis) {

    if(keyInput.isKeyInputActive(KeyEvent.VK_ESCAPE)) {
      this.bus.broadcast(new StateChange(MenuState.class));
    }

    if(keyInput.isKeyInputActive(KeyEvent.VK_LEFT) && this.rotationReady) {
      this.bus.send(new RotationChange(-ROTATION_INCREMENT_DEGREES), this.getEntityId());
      this.throttleRotation();
View Full Code Here

TOP

Related Classes of org.seattlegamer.spacegame.messages.StateChange

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.