Add positional sounds from the tilemap

This commit is contained in:
2014-06-13 23:54:26 -07:00
parent e929698e4e
commit ca8433c0e7

View File

@@ -127,8 +127,8 @@ 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 = Math.max(1.0, Number(hyp / hyp_perfect)); this.sound.volume = 1.0 - Math.max(1.0, Number(hyp / hyp_perfect));
console.log([hyp_perfect, hyp, Number(hyp / hyp_perfect), this.sound.volume]); );
} }
var moonlightSettings = { var moonlightSettings = {