Added new format for sounds
This commit is contained in:
parent
577dd87ba3
commit
6d5c2491c2
BIN
static/data/music/redcoins/1.ogg
Normal file
BIN
static/data/music/redcoins/1.ogg
Normal file
Binary file not shown.
BIN
static/data/music/redcoins/2.ogg
Normal file
BIN
static/data/music/redcoins/2.ogg
Normal file
Binary file not shown.
BIN
static/data/music/redcoins/3.ogg
Normal file
BIN
static/data/music/redcoins/3.ogg
Normal file
Binary file not shown.
BIN
static/data/music/redcoins/4.ogg
Normal file
BIN
static/data/music/redcoins/4.ogg
Normal file
Binary file not shown.
BIN
static/data/music/redcoins/5.ogg
Normal file
BIN
static/data/music/redcoins/5.ogg
Normal file
Binary file not shown.
BIN
static/data/music/redcoins/6.ogg
Normal file
BIN
static/data/music/redcoins/6.ogg
Normal file
Binary file not shown.
BIN
static/data/music/redcoins/7.ogg
Normal file
BIN
static/data/music/redcoins/7.ogg
Normal file
Binary file not shown.
BIN
static/data/music/redcoins/8.ogg
Normal file
BIN
static/data/music/redcoins/8.ogg
Normal file
Binary file not shown.
7
static/js/prototype/Coin.js
vendored
7
static/js/prototype/Coin.js
vendored
@ -4,6 +4,9 @@ var Coin = function(x,y,z) {
|
|||||||
this.init(x,y,z);
|
this.init(x,y,z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _toto = new Audio();
|
||||||
|
Coin.extension = _toto.canPlayType("audio.mpeg") === "" ? ".mp3" : ".ogg";
|
||||||
|
|
||||||
Coin.prototype.init = function(x,y,z) {
|
Coin.prototype.init = function(x,y,z) {
|
||||||
if (Coin.BASIC_MESH !== null) {
|
if (Coin.BASIC_MESH !== null) {
|
||||||
this.mesh = Coin.BASIC_MESH.clone();
|
this.mesh = Coin.BASIC_MESH.clone();
|
||||||
@ -16,7 +19,7 @@ Coin.prototype.init = function(x,y,z) {
|
|||||||
(function(self,x,y,z) {
|
(function(self,x,y,z) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
self.init(x,y,z);
|
self.init(x,y,z);
|
||||||
Coin.nextSound = new Audio(static_path + 'data/music/redcoins/1.mp3');
|
Coin.nextSound = new Audio(static_path + 'data/music/redcoins/1' + Coin.extension);
|
||||||
},1000);
|
},1000);
|
||||||
})(this,x,y,z);
|
})(this,x,y,z);
|
||||||
}
|
}
|
||||||
@ -59,7 +62,7 @@ Coin.prototype.get = function() {
|
|||||||
}, Coin.nextSound.duration*1000);
|
}, Coin.nextSound.duration*1000);
|
||||||
})(music, wasPlaying);
|
})(music, wasPlaying);
|
||||||
} else {
|
} else {
|
||||||
Coin.nextSound = new Audio('/static/data/music/redcoins/' + Coin.total + '.mp3');
|
Coin.nextSound = new Audio('/static/data/music/redcoins/' + Coin.total + Coin.extension);
|
||||||
Coin.nextSound.preload = "auto";
|
Coin.nextSound.preload = "auto";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user