@Override
public void initialise() {
WidgetUtil.trySubscribe(this, "respawn", new ActivateEventListener() {
@Override
public void onActivated(UIWidget widget) {
CoreRegistry.get(LocalPlayer.class).getClientEntity().send(new RespawnRequestEvent());
getManager().closeScreen(DeathScreen.this);
}
});
WidgetUtil.trySubscribe(this, "settings", new ActivateEventListener() {
@Override
public void onActivated(UIWidget widget) {
getManager().pushScreen("settingsMenuScreen");
}
});
WidgetUtil.trySubscribe(this, "mainMenu", new ActivateEventListener() {
@Override
public void onActivated(UIWidget widget) {
CoreRegistry.get(LocalPlayer.class).getClientEntity().send(new RespawnRequestEvent());
CoreRegistry.get(GameEngine.class).changeState(new StateMainMenu());
}
});
WidgetUtil.trySubscribe(this, "exitGame", new ActivateEventListener() {
@Override