mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-22 21:26:49 +00:00
Merge pull request #646 from FunkinCrew/gamerbross/playonce-returns
[PUBLIC PR] FunkinSound.playOnce now returns the created sound
This commit is contained in:
commit
6593ddbbc8
|
@ -535,11 +535,12 @@ class FunkinSound extends FlxSound implements ICloneable<FunkinSound>
|
|||
* Play a sound effect once, then destroy it.
|
||||
* @param key
|
||||
* @param volume
|
||||
* @return static function construct():FunkinSound
|
||||
* @return A `FunkinSound` object, or `null` if the sound could not be loaded.
|
||||
*/
|
||||
public static function playOnce(key:String, volume:Float = 1.0, ?onComplete:Void->Void, ?onLoad:Void->Void):Void
|
||||
public static function playOnce(key:String, volume:Float = 1.0, ?onComplete:Void->Void, ?onLoad:Void->Void):Null<FunkinSound>
|
||||
{
|
||||
var result = FunkinSound.load(key, volume, false, true, true, onComplete, onLoad);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue