Added ending sound
This commit is contained in:
parent
2dccb1eede
commit
bf1e6db58e
Binary file not shown.
|
@ -41,8 +41,9 @@ 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) {
|
if (Coin.total === 9) {
|
||||||
alert("You got all the red coins !");
|
var audio = new Audio('/static/data/music/starappears.mp3');
|
||||||
|
audio.play();
|
||||||
} else {
|
} else {
|
||||||
Coin.nextSound = new Audio('/static/data/music/redcoins/' + Coin.total + '.mp3');
|
Coin.nextSound = new Audio('/static/data/music/redcoins/' + Coin.total + '.mp3');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue