some nice sounds
This commit is contained in:
parent
6e9d12b94f
commit
310e907b83
7 changed files with 9 additions and 0 deletions
|
@ -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
BIN
sounds/highest.ogg
Executable file
Binary file not shown.
BIN
sounds/highest.wav
Normal file
BIN
sounds/highest.wav
Normal file
Binary file not shown.
BIN
sounds/lowest.ogg
Executable file
BIN
sounds/lowest.ogg
Executable file
Binary file not shown.
BIN
sounds/lowest.wav
Normal file
BIN
sounds/lowest.wav
Normal file
Binary file not shown.
BIN
sounds/middle.ogg
Executable file
BIN
sounds/middle.ogg
Executable file
Binary file not shown.
BIN
sounds/middle.wav
Normal file
BIN
sounds/middle.wav
Normal file
Binary file not shown.
Loading…
Reference in a new issue