From 01784ba85a811335921b6493a8fe93dd91256787 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Tue, 24 Jan 2017 11:04:13 -0800 Subject: [PATCH] Fix wave complete and game over sounds not playing at correct location --- .../DomainContent/Toybox/towerDefense/playWaveGame.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unpublishedScripts/DomainContent/Toybox/towerDefense/playWaveGame.js b/unpublishedScripts/DomainContent/Toybox/towerDefense/playWaveGame.js index 47d768b66d..5a26de60c4 100644 --- a/unpublishedScripts/DomainContent/Toybox/towerDefense/playWaveGame.js +++ b/unpublishedScripts/DomainContent/Toybox/towerDefense/playWaveGame.js @@ -377,10 +377,11 @@ GameManager.prototype = { this.checkEnemyPositionsTimer = null; // Play after 1.5s to let other sounds finish playing + var self = this; Script.setTimeout(function() { Audio.playSound(WAVE_COMPLETE_SOUND, { volume: 1.0, - position: this.rootPosition + position: self.rootPosition }); }, 1500); } @@ -445,10 +446,11 @@ GameManager.prototype = { return; } + var self = this; Script.setTimeout(function() { Audio.playSound(GAME_OVER_SOUND, { volume: 1.0, - position: this.rootPosition + position: self.rootPosition }); }, 1500);