diff --git a/src/game.js b/src/game.js index 4fd38db..66914a0 100644 --- a/src/game.js +++ b/src/game.js @@ -12,6 +12,7 @@ define(['bird', 'pipe', 'score', 'difficulty', '../lib/promise-0.1.1.min'], func var flash = false; var showIntroScreen = true; + var levelPassed = false; var bgCanvas = document.createElement('canvas'); bgCanvas.width = 640; @@ -106,6 +107,7 @@ define(['bird', 'pipe', 'score', 'difficulty', '../lib/promise-0.1.1.min'], func if ( bird.getLowerBound() >= groundLevel || collision ) { score.resetPoints(); + difficulty.reset(); bird.die(); flash = true; } @@ -118,6 +120,10 @@ define(['bird', 'pipe', 'score', 'difficulty', '../lib/promise-0.1.1.min'], func pipeRightOuter