stopSound

This commit is contained in:
2022-01-09 18:48:10 -07:00
parent 35d55f0c86
commit 1e2ae2821f
2 changed files with 5 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ interface Director<Set, StagePosition, StageFacing, ScreenPosition, Actor, Sound
function moveCharacter(character:Character<StagePosition, StageFacing, Actor>, toPos:StagePosition, toFacing:StageFacing, cc:Continuation):Void;
function swapCharacters(a:Character<StagePosition, StageFacing, Actor>, b:Character<StagePosition, StageFacing, Actor>, cc:Continuation):Void;
function playSound(sound:Sound, volumeMod:Float, waitForEnd:Bool, cc:Continuation):Void;
function stopSound(sound:Sound):Void;
function playSong(song:Song, volumeMod:Float, loop:Bool, waitForEnd:Bool, cc:Continuation):Void;
function stopSong():Void;
function playVoiceTrack(track:VoiceTrack, volumeMod:Float, start:Float, end:Float, cc:Continuation):Void;

View File

@@ -194,6 +194,10 @@
(hollywooMethod awaitPlaySound true [name :Continuation cc &opt :Float volumeMod]
(playSound name cc volumeMod true))
(hollywooMethod stopSound true [name :Continuation cc]
(director.stopSound (dictGet sounds name))
(cc))
(hollywooMethod newSong true [name :Song song]
(assert isLoading)
(dictSet songs name song))