This commit is contained in:
MickWerf
2020-06-07 17:25:57 +02:00
6 changed files with 58 additions and 4 deletions

View File

@@ -219,6 +219,7 @@ public class MainGame extends Game implements ClientCallback {
} else if (this.team.isDead()) {
text += "Too bad! You lost!";
}
text += "\nPress ESC to exit the game";
renderString(text, Gdx.graphics.getWidth() / 2f, Gdx.graphics.getHeight() / 2f);
}
@@ -317,6 +318,12 @@ public class MainGame extends Game implements ClientCallback {
return map.getWidth();
}
public void exit() {
client.disconnect();
dispose();
Gdx.app.exit();
}
public void setSelectedCharacter(GameCharacter character) {
if (!character.isDead()) {
this.selectedCharacter = character;