public void update() { for (Updatable updatable : updatables.values()) { updatable.update(); } Game game = Main.app.getStateManager().getState(Game.class); timeLabel.setText(game.getTimeString()); // update pathfinding statistics PathManager pathFinding = PathManager.getSingleton(); NumberFormat numberFormat = NumberFormat.getIntegerInstance(); // comma seperated expandedNodesLabel.setText(numberFormat.format(-1)); graphReadsLabel.setText(numberFormat.format(-1)); }
private void showNextEntry(@Nonnull final Iterator<CreditsList> iterator) { if (!iterator.hasNext()) { gotoNextScreen(); return; } final CreditsList list = iterator.next(); if (Lang.getInstance().isGerman()) { titleLabel.setText(list.getNameGerman()); } else { titleLabel.setText(list.getNameEnglish()); } final List<String> names = new ArrayList<String>(); for (final CreditsPerson person : list) { names.add(person.getName()); } final StringBuilder builder = new StringBuilder(); final int nameCount = names.size(); for (int i = 0; i < nameCount; i++) { builder.append(names.get(i)); if (i < (nameCount - 2)) { builder.append(", "); } else if (i < (nameCount - 1)) { if (Lang.getInstance().isGerman()) { builder.append(" und "); } else { builder.append(" and "); } } } nameLabel.setText(builder.toString()); displayParent.layoutElements(); displayParent.show( new EndNotify() { @Override public void perform() { displayParent.hide( new EndNotify() { @Override public void perform() { showNextEntry(iterator); } }); } }); }
public void onStartScreen() { System.out.println("GameScreen onStartScreen"); Game game = Main.app.getStateManager().getState(Game.class); game.setGameScreenController(this); timeLabel.setText(game.getTimeString()); GameCameraState Cam = Main.app.getStateManager().getState(GameCameraState.class); Cam.pointCameraAt(game.getMap().getMapCenter()); }