Add positional sounds from the tilemap

This commit is contained in:
2014-06-13 23:05:50 -07:00
parent 86ed0bb7db
commit 4e31a4d36d

View File

@@ -108,7 +108,7 @@ SoundSprite.prototype.update_new_values = function() {
SoundSprite.prototype.adjust_relative_to = function(spr) { SoundSprite.prototype.adjust_relative_to = function(spr) {
if ( this.sound_alwaysplay == false ) { if ( this.sound_alwaysplay == false ) {
// we can't use inCamera because we don't have a body/sprite // we can't use inCamera because we don't have a body/sprite
if ( ! game.camera.screenView.contains(this.x, this.y) ) { if ( game.camera.screenView.contains(this.x, this.y) == false ) {
console.log("Sound is not on camera"); console.log("Sound is not on camera");
// don't turn it off, let it continue at zero volume // don't turn it off, let it continue at zero volume
// for more realistic effect whe the player returns // for more realistic effect whe the player returns