From dde22c550137a151dda646a1aec56a026f43a011 Mon Sep 17 00:00:00 2001 From: DetectiveBaldi <86160807+DetectiveBaldi@users.noreply.github.com> Date: Fri, 10 Jan 2025 19:13:39 -0500 Subject: [PATCH] make onFinish final --- flixel/sound/FlxSound.hx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/flixel/sound/FlxSound.hx b/flixel/sound/FlxSound.hx index d8ed4a78a..4ee5a6457 100644 --- a/flixel/sound/FlxSound.hx +++ b/flixel/sound/FlxSound.hx @@ -73,7 +73,7 @@ class FlxSound extends FlxBasic /** * Signal that is dispatched on sound complete. */ - public var onFinish:FlxSignal; + public final onFinish:FlxSignal; /** * Tracker for sound complete callback. If assigned, will be called @@ -223,6 +223,7 @@ class FlxSound extends FlxBasic public function new() { super(); + onFinish = new FlxSignal(); reset(); } @@ -231,9 +232,6 @@ class FlxSound extends FlxBasic */ function reset():Void { - if (onFinish == null) - onFinish = new FlxSignal(); - destroy(); x = 0;