Skip to content

Commit

Permalink
FunkinSound.playOnce return sound
Browse files Browse the repository at this point in the history
  • Loading branch information
gamerbross authored and charlesisfeline committed Jun 27, 2024
1 parent 3ea1dae commit 6bb7003
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/funkin/audio/FunkinSound.hx
Original file line number Diff line number Diff line change
Expand Up @@ -540,11 +540,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):FunkinSound
{
var result = FunkinSound.load(key, volume, false, true, true, onComplete, onLoad);
return result;
}

/**
Expand Down

0 comments on commit 6bb7003

Please sign in to comment.