Test changes and removed useless function stuff
This commit is contained in:
parent
02650d6ea6
commit
d385c9ee22
|
@ -51,18 +51,14 @@ Coin.prototype.get = function() {
|
||||||
var music = document.getElementById('music');
|
var music = document.getElementById('music');
|
||||||
var wasPlaying = !music.paused;
|
var wasPlaying = !music.paused;
|
||||||
music.pause();
|
music.pause();
|
||||||
(function(music, wasPlaying) {
|
setTimeout(function() {
|
||||||
|
Coin.lastSound.play();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
Coin.lastSound.play();
|
if (wasPlaying) {
|
||||||
(function(wasPlaying) {
|
music.play();
|
||||||
setTimeout(function() {
|
}
|
||||||
if (wasPlaying) {
|
}, Coin.lastSound.duration*1000);
|
||||||
music.play();
|
}, Coin.nextSound.duration*1000);
|
||||||
}
|
|
||||||
}, Coin.lastSound.duration*1000);
|
|
||||||
})(wasPlaying);
|
|
||||||
}, Coin.nextSound.duration*1000);
|
|
||||||
})(music, wasPlaying);
|
|
||||||
} else {
|
} else {
|
||||||
Coin.nextSound = new Audio('/static/data/music/redcoins/' + Coin.total + Coin.extension);
|
Coin.nextSound = new Audio('/static/data/music/redcoins/' + Coin.total + Coin.extension);
|
||||||
Coin.nextSound.preload = "auto";
|
Coin.nextSound.preload = "auto";
|
||||||
|
|
|
@ -85,5 +85,5 @@ if ( app.get('env') === 'development' ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start server
|
// Start server
|
||||||
console.log("Server ready : " + server_ip_address + ":" + server_port);
|
console.log("Server ready : now listening " + server_ip_address + ":" + server_port);
|
||||||
app.listen(server_port, server_ip_address);
|
app.listen(server_port, server_ip_address);
|
||||||
|
|
Loading…
Reference in New Issue