initial commit
This commit is contained in:
parent
3c9ee26b06
commit
22186c33b9
1458 changed files with 282792 additions and 0 deletions
40
java/src/game/gui/GuiGameOver.java
Executable file
40
java/src/game/gui/GuiGameOver.java
Executable file
|
@ -0,0 +1,40 @@
|
|||
package game.gui;
|
||||
|
||||
import game.ActButton;
|
||||
import game.Gui;
|
||||
import game.Label;
|
||||
import game.color.TextColor;
|
||||
import game.ActButton.Mode;
|
||||
|
||||
public class GuiGameOver extends Gui {
|
||||
public static final GuiGameOver INSTANCE = new GuiGameOver();
|
||||
|
||||
private ActButton button;
|
||||
private int timer;
|
||||
|
||||
private GuiGameOver() {
|
||||
}
|
||||
|
||||
public void init(int width, int height) {
|
||||
this.timer = 0;
|
||||
this.add(new Label(0, 0, 200, 20, "Du bist gestorben!"));
|
||||
this.add(new Label(0, 32, 200, 20, "Punktestand: " + TextColor.YELLOW + this.gm.thePlayer.experienceLevel));
|
||||
this.button = this.add(new ActButton(0, 100, 200, 20, new ActButton.Callback() {
|
||||
public void use(ActButton elem, Mode action) {
|
||||
GuiGameOver.this.gm.thePlayer.respawnPlayer();
|
||||
GuiGameOver.this.gm.displayGuiScreen(null);
|
||||
}
|
||||
}, "Wiederbeleben"));
|
||||
this.shift();
|
||||
this.button.enabled = false;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return "Game over";
|
||||
}
|
||||
|
||||
public void updateScreen() {
|
||||
if(++this.timer >= 20)
|
||||
this.button.enabled = true;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue