Add 'playSound' api docs (#340)
* Add 'playSound' api docs * Linkup summary
This commit is contained in:
committed by
Peli de Halleux
parent
6524b0a841
commit
60ec3f1c99
@ -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++;
|
||||
|
Reference in New Issue
Block a user