Merge branch 'master' of https://github.com/SemvdH/netwerk-programming-eindopdracht
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user