From f057964a5030809a53bff7712585931d32237454 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 16 Jan 2018 16:44:32 -0800 Subject: [PATCH] pausing until sound is done in mood --- libs/ev3/pxt.json | 4 ++-- libs/mood/mood.ts | 3 +-- libs/mood/pxt.json | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/ev3/pxt.json b/libs/ev3/pxt.json index 0e7ea956..2a8b821c 100644 --- a/libs/ev3/pxt.json +++ b/libs/ev3/pxt.json @@ -10,11 +10,11 @@ "base": "file:../base", "core": "file:../core", "music": "file:../music", - "mood": "file:../mood", "color-sensor": "file:../color-sensor", "touch-sensor": "file:../touch-sensor", "ultrasonic-sensor": "file:../ultrasonic-sensor", - "gyro-sensor": "file:../gyro-sensor" + "gyro-sensor": "file:../gyro-sensor", + "mood": "file:../mood" }, "public": true } diff --git a/libs/mood/mood.ts b/libs/mood/mood.ts index d91da8ff..c7495ef3 100644 --- a/libs/mood/mood.ts +++ b/libs/mood/mood.ts @@ -23,8 +23,7 @@ namespace brick { show() { brick.setLight(this.light); brick.showImage(this.image); - if (this.sound) - music.playSoundEffect(this.sound); + music.playSoundEffectUntilDone(this.sound); } } diff --git a/libs/mood/pxt.json b/libs/mood/pxt.json index 762582c5..0533f738 100644 --- a/libs/mood/pxt.json +++ b/libs/mood/pxt.json @@ -9,6 +9,7 @@ ], "public": true, "dependencies": { - "core": "file:../core" + "core": "file:../core", + "music": "file:../music" } } \ No newline at end of file