congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ResumeGame
Code IndexAdd Tabnine to your IDE (free)

How to use
ResumeGame
in
ch.sahits.game.event.data

Best Java code snippets using ch.sahits.game.event.data.ResumeGame (Showing top 3 results out of 315)

origin: ch.sahits.game/OpenPatricianServer

private void handleNewGame(NewGame newGameDTO) {
    PropertyInitializer propInit = serverContext.getBean(PropertyInitializer.class);
    propInit.setKeySuffix(newGameDTO.getDifficulty().getLevel());
    serverContext.getBean("dependentPropertyInitializer"); // Force initialisation
    IHumanPlayer player = startupGameEnvironment(newGameDTO);
    // todo: andi 18/01/14: notify the client so the GameStatus can be updated
    NewGameClient newGameClientDTO = NewGameClient.builder().player(player).build();
    clientServerEventBus.post(new ResumeGame());
    clientServerEventBus.post(newGameClientDTO);
}
origin: ch.sahits.game/OpenPatricianDisplay

@Subscribe
public void handleGameStateChange(GameStateChange stateChange) {
  if (stateChange.getStatusChange() == EGameStatusChange.GAME_INITIALISATION_COMPLETE) {
    logger.info("Load and replace the game");
     gameOptions.load(lodableGames.getSelectedValue());
  }
  if (stateChange.getStatusChange() == EGameStatusChange.GAME_LOADED) {
    uiFactory.invalidate();
    final MainGameScene mainGameScene1 = uiFactory.getMainGameScene(getRoot().getWidth(), getRoot().getHeight());
    mainGameScene1.initializeGameView(null);
    Platform.runLater(() ->
      changeScene(mainGameScene1)
    );
    timerEventBus.post(new ResumeGame());
  }
}
origin: ch.sahits.game/OpenPatricianDisplay

private EventHandler<MouseEvent> getBackEvent() {
  return event -> {
    try {
      EGameSpeed gameSpeed = EGameSpeed.values()[speed.getSelectedIndex()];
      EGameSpeed currentSpeed = game.getGameSpeed();
      if (gameSpeed != currentSpeed) {
        game.setGameSpeed(gameSpeed);
      }
      MainGameScene mainGame = uiFactory.getMainGameScene(getRoot().getWidth(), getRoot().getHeight());
      getSceneChangeable().changeScene(mainGame);
      soundPlayer.play();
      newSaveGame.setText("");
      timerEventBus.post(new ResumeGame());
    } catch (RuntimeException e) {
      logger.error("Failed to go back to game", e);
    }
  };
}
ch.sahits.game.event.dataResumeGame

Javadoc

Event object for resuming the game.

Most used methods

  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • JTextField (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now