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 EliteMasterEric committed Jun 29, 2024
1 parent dd30012 commit 03eab14
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 @@ -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):FunkinSound
{
var result = FunkinSound.load(key, volume, false, true, true, onComplete, onLoad);
return result;
}

/**
Expand Down

0 comments on commit 03eab14

Please sign in to comment.