some nice sounds

This commit is contained in:
Garrett Finucane 2014-05-19 13:25:20 -04:00
parent 6e9d12b94f
commit 310e907b83
7 changed files with 9 additions and 0 deletions

View file

@ -49,6 +49,10 @@ function Block(lane, color, distFromHex, settled) {
};
}
var colorSounds = {"#e74c3c": new Audio("../sounds/lowest.ogg"),
"#f1c40f":new Audio("../sounds/highest.ogg"),
"#3498db":new Audio("../sounds/middle.ogg")
};
function Clock(sideLength) {
this.fillColor = '#2c3e50';
@ -76,6 +80,11 @@ function Clock(sideLength) {
block.distFromHex = MainClock.sideLength / 2 * Math.sqrt(3) + block.height * this.blocks[lane].length;
this.blocks[lane].push(block);
consolidateBlocks(this, lane, this.blocks[lane].length - 1);
if (window.chrome) {
colorSounds[block.color].load();
}
colorSounds[block.color].play();
};
this.doesBlockCollide = function(block, iter, position, tArr) {

BIN
sounds/highest.ogg Executable file

Binary file not shown.

BIN
sounds/highest.wav Normal file

Binary file not shown.

BIN
sounds/lowest.ogg Executable file

Binary file not shown.

BIN
sounds/lowest.wav Normal file

Binary file not shown.

BIN
sounds/middle.ogg Executable file

Binary file not shown.

BIN
sounds/middle.wav Normal file

Binary file not shown.