Add 'playSound' api docs (#340)

* Add 'playSound' api docs

* Linkup summary
This commit is contained in:
Galen Nickel
2018-02-22 16:23:07 -08:00
committed by Peli de Halleux
parent 6524b0a841
commit 60ec3f1c99
5 changed files with 113 additions and 1 deletions

View File

@ -260,11 +260,12 @@ namespace music {
const soundsLimit = 1;
/**
* Plays a sound
* Play a sound and wait until it finishes
* @param sound the sound to play
*/
//% blockId=music_play_sound_effect_until_done block="play sound effect %sound|until done"
//% weight=98 blockGap=8
//% help=music/play-sound-effect-until-done
export function playSoundEffectUntilDone(sound: Sound) {
if (!sound || numSoundsPlaying >= soundsLimit) return;
numSoundsPlaying++;
@ -288,6 +289,7 @@ namespace music {
*/
//% blockId=music_play_sound_effect block="play sound effect %sound"
//% weight=99 blockGap=8
//% help=music/play-sound-effect
export function playSoundEffect(sound: Sound) {
if (!sound || numSoundsPlaying >= soundsLimit) return;
numSoundsPlaying++;