1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-15 03:13:45 +00:00

Merge pull request #2926 from gamerbross/tweak/funkinsound-playonce-return-value

[CODE TWEAK] `FunkinSound.playOnce` return the created sound
This commit is contained in:
Eric 2024-09-16 18:36:53 -04:00 committed by GitHub
commit 8470880e4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -543,7 +543,7 @@ class FunkinSound extends FlxSound implements ICloneable<FunkinSound>
*/
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);
var result:Null<FunkinSound> = FunkinSound.load(key, volume, false, true, true, onComplete, onLoad);
return result;
}