Implemented hiscore and hiscore display

This commit is contained in:
Anuken
2017-05-05 17:37:21 -04:00
parent eef909db3e
commit 73d5dbdd34
7 changed files with 41 additions and 10 deletions

View File

@@ -29,6 +29,8 @@ public class GameState{
player.heal();
Inventory.clearItems();
spawnpoints.clear();
respawntime = -1;
hiscore = false;
ui.updateItems();
ui.updateWeapons();
@@ -89,6 +91,14 @@ public class GameState{
wave ++;
int last = Settings.getInt("hiscore"+maps[currentMap]);
if(wave > last){
Settings.putInt("hiscore"+maps[currentMap], wave);
Settings.save();
hiscore = true;
}
wavetime = waveSpacing();
}