Add positional sounds from the tilemap

This commit is contained in:
2014-06-14 00:04:12 -07:00
parent bb2f643951
commit b62116df96

View File

@@ -127,9 +127,9 @@ SoundSprite.prototype.adjust_relative_to = function(spr) {
Number((game.camera.height/2) * (game.camera.height/2)) Number((game.camera.height/2) * (game.camera.height/2))
); );
this.sound.volume = Number(hyp / hyp_perfect); this.sound.volume = (1.0 - Number(hyp / hyp_perfect));
console.log([hyp_perfect, hyp, Number(hyp / hyp_perfect), this.sound.volume]); console.log([hyp_perfect, hyp, (1.0 - Number(hyp / hyp_perfect)), this.sound.volume]);
} }
var moonlightSettings = { var moonlightSettings = {