use of org.terasology.engine.logic.players.event.RespawnRequestEvent in project Terasology by MovingBlocks.
the class DeathScreen method initialise.
@Override
public void initialise() {
deathDetails = find("deathDetails", UILabel.class);
WidgetUtil.trySubscribe(this, "respawn", widget -> {
localPlayer.getClientEntity().send(new RespawnRequestEvent());
getManager().closeScreen(DeathScreen.this);
});
WidgetUtil.trySubscribe(this, "settings", widget -> getManager().pushScreen("settingsMenuScreen"));
WidgetUtil.trySubscribe(this, "mainMenu", widget -> {
localPlayer.getClientEntity().send(new RespawnRequestEvent());
gameEngine.changeState(new StateMainMenu());
});
WidgetUtil.trySubscribe(this, "exitGame", widget -> CoreRegistry.get(GameEngine.class).shutdown());
}
Aggregations