Commit b1536342 authored by Matthew Odle's avatar Matthew Odle

update level over checks

parent 3c630ca7
......@@ -20,7 +20,11 @@ var game = {
},
functionOverrides : {
gameLevelCheck : function() {
return centipedes.numberSpawned == centipedes.numberKilled && this.gameArea.frameNo;
let levelEnded =
(centipedes.numberSpawned > 0 || metrics.currentLevel == 0) &&
centipedes.numberSpawned == centipedes.numberKilled &&
this.gameArea.frameNo > 0;
return levelEnded;
},
},
};
......@@ -151,8 +151,7 @@ var menusProps = {
if (game.activePlayers != game.numberOfPlayers) {
menus.display('playerActivate');
} else {
game.running = true;
game.paused = false;
game.run();
};
},
},
......@@ -199,8 +198,7 @@ var menusProps = {
text : '1 PLAYER',
action : function() {
menus.disableMenus();
game.running = true;
game.paused = false;
game.run();
game.numberOfPlayers = 1;
game.activePlayers = 1;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment