Added alert when finished
This commit is contained in:
parent
53c630554c
commit
461b321652
|
@ -41,8 +41,12 @@ Coin.prototype.get = function() {
|
||||||
this.mesh.visible = false;
|
this.mesh.visible = false;
|
||||||
Coin.total ++;
|
Coin.total ++;
|
||||||
Coin.nextSound.play();
|
Coin.nextSound.play();
|
||||||
|
if (Coin.total ===9) {
|
||||||
|
alert("You got all the red coins !");
|
||||||
|
} else {
|
||||||
Coin.nextSound = new Audio('/static/data/music/redcoins/' + Coin.total + '.mp3');
|
Coin.nextSound = new Audio('/static/data/music/redcoins/' + Coin.total + '.mp3');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Coin.total = 1;
|
Coin.total = 1;
|
||||||
|
|
Loading…
Reference in New Issue