add exp command, fix game over screen
This commit is contained in:
parent
8f1fda3f3d
commit
cdf8db1b50
4 changed files with 57 additions and 8 deletions
|
@ -4,7 +4,9 @@ import client.gui.Gui;
|
|||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ButtonCallback;
|
||||
import common.color.TextColor;
|
||||
import common.util.ExtMath;
|
||||
import client.gui.element.Label;
|
||||
import client.gui.element.MultiLabel;
|
||||
import client.gui.element.PressType;
|
||||
|
||||
public class GuiGameOver extends Gui {
|
||||
|
@ -18,9 +20,9 @@ public class GuiGameOver extends Gui {
|
|||
|
||||
public void init(int width, int height) {
|
||||
this.timer = 0;
|
||||
this.add(new Label(0, 0, 200, 0, "Du bist gestorben!"));
|
||||
this.add(new Label(0, 32, 200, 0, "Punktestand: " + TextColor.YELLOW + this.gm.player.experienceLevel));
|
||||
this.button = this.add(new ActButton(0, 100, 200, 0, new ButtonCallback() {
|
||||
this.add(new Label(0, 0, 400, 0, TextColor.DRED + "Du bist gestorben!"));
|
||||
this.add(new MultiLabel(0, 32, 400, 42, String.format(TextColor.GREEN + "Letzte Position" + TextColor.GRAY + ":\n" + TextColor.YELLOW + "%d, %d, %d\n" + TextColor.YELLOW + "%s", ExtMath.floord(this.gm.player.posX), ExtMath.floord(this.gm.player.posY), ExtMath.floord(this.gm.player.posZ), this.gm.player.worldObj.dimension.getFormattedName(false))));
|
||||
this.button = this.add(new ActButton(100, 100, 200, 0, new ButtonCallback() {
|
||||
public void use(ActButton elem, PressType action) {
|
||||
GuiGameOver.this.gm.player.respawnPlayer();
|
||||
GuiGameOver.this.gm.displayGuiScreen(null);
|
||||
|
@ -31,7 +33,7 @@ public class GuiGameOver extends Gui {
|
|||
}
|
||||
|
||||
public String getTitle() {
|
||||
return "Game over";
|
||||
return "Game over - Wiederbeleben?";
|
||||
}
|
||||
|
||||
public void updateScreen() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue