add exit method

This commit is contained in:
Sem van der Hoeven
2020-06-07 17:15:00 +02:00
parent 9ed89bf642
commit 6ae2b5de51
5 changed files with 14 additions and 4 deletions

View File

@@ -320,6 +320,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;