use of com.almasb.fxgl.ui.LevelText in project FXGL by AlmasB.
the class ScifiSample method initUI.
@Override
protected void initUI() {
getGameScene().removeUINode(levelText);
getGameScene().removeUINode(panel);
levelText = new LevelText("Level " + (level - 1));
getGameScene().addUINode(levelText);
panel = new InGamePanel();
Text text = getUIFactory().newText("No Network Connection", Color.BLACK, 24.0);
text.setTranslateX(getWidth() / 3 / 2 - text.getLayoutBounds().getWidth() / 2);
text.setTranslateY(getHeight() / 2);
panel.getChildren().add(text);
getGameScene().addUINode(panel);
}
use of com.almasb.fxgl.ui.LevelText in project FXGL by AlmasB.
the class InterpolatorSample method initGame.
@Override
protected void initGame() {
LevelText text = new LevelText("Level 1");
text.animateIn();
player = Entities.builder().viewFromNode(text).buildAndAttach(getGameWorld());
}
Aggregations