Skip to content

Commit

Permalink
make onFinish final
Browse files Browse the repository at this point in the history
  • Loading branch information
DetectiveBaldi committed Jan 11, 2025
1 parent 2d78ec5 commit dde22c5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions flixel/sound/FlxSound.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -223,6 +223,7 @@ class FlxSound extends FlxBasic
public function new()
{
super();
onFinish = new FlxSignal();
reset();
}

Expand All @@ -231,9 +232,6 @@ class FlxSound extends FlxBasic
*/
function reset():Void
{
if (onFinish == null)
onFinish = new FlxSignal();

destroy();

x = 0;
Expand Down

0 comments on commit dde22c5

Please sign in to comment.