From 48ce3cf5a06e34f0033f942d362386bb050e53c8 Mon Sep 17 00:00:00 2001 From: Philipp Abraham Date: Sun, 16 Feb 2014 22:30:36 +0100 Subject: [PATCH] show message when difficulty level increases --- src/game.js | 34 +++++++++++++++++++++++++++++++++- src/score.js | 7 +++---- 2 files changed, 36 insertions(+), 5 deletions(-) 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