Add positional sounds from the tilemap

This commit is contained in:
2014-06-13 23:55:37 -07:00
parent 40dcaed0f5
commit 6a0eab04c2

View File

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