stopSound
This commit is contained in:
@@ -228,6 +228,9 @@
|
||||
(sound.play)
|
||||
(unless waitForEnd (cc)))
|
||||
|
||||
(method :Void stopSound [:FlxSound sound]
|
||||
(sound.stop))
|
||||
|
||||
(var DELAY_BETWEEN_VOICE_TRACKS 0.1)
|
||||
(prop :Map<FlxSound,Function> restoreOriginalVolumes (new Map))
|
||||
(method :Void playVoiceTrack [:FlxSound track :Float volumeMod :Float start :Float end :Continuation cc]
|
||||
|
@@ -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;
|
||||
|
@@ -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))
|
||||
|
Reference in New Issue
Block a user