diff --git a/assets b/assets index 96efb6e83..23a23165c 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 96efb6e837e5842880dc5b3f038b198ed378c72a +Subproject commit 23a23165c1185a89ca6095fb65ea24a78c3f7d60 diff --git a/source/funkin/play/cutscene/dialogue/DialogueBox.hx b/source/funkin/play/cutscene/dialogue/DialogueBox.hx index 6d3c0b8bc..47acad4cc 100644 --- a/source/funkin/play/cutscene/dialogue/DialogueBox.hx +++ b/source/funkin/play/cutscene/dialogue/DialogueBox.hx @@ -247,8 +247,8 @@ class DialogueBox extends FlxSpriteGroup implements IDialogueScriptedClass imple var animNames:Array = this.boxSprite?.animation?.getNameList() ?? []; trace('[DIALOGUE BOX] Successfully loaded ${animNames.length} animations for ${id}'); - boxSprite.animation.callback = this.onAnimationFrame; - boxSprite.animation.finishCallback = this.onAnimationFinished; + boxSprite.animation.onFrameChange.add(this.onAnimationFrame); + boxSprite.animation.onFinish.add(this.onAnimationFinished); } /** diff --git a/source/funkin/play/notes/StrumlineNote.hx b/source/funkin/play/notes/StrumlineNote.hx index ebe95e920..03b782485 100644 --- a/source/funkin/play/notes/StrumlineNote.hx +++ b/source/funkin/play/notes/StrumlineNote.hx @@ -52,8 +52,8 @@ class StrumlineNote extends FunkinSprite setup(noteStyle); - this.animation.callback = onAnimationFrame; - this.animation.finishCallback = onAnimationFinished; + this.animation.onFrameChange.add(onAnimationFrame); + this.animation.onFinish.add(onAnimationFinished); // Must be true for animations to play. this.active = true; diff --git a/source/funkin/play/stage/Bopper.hx b/source/funkin/play/stage/Bopper.hx index b98f03e63..76c8fc810 100644 --- a/source/funkin/play/stage/Bopper.hx +++ b/source/funkin/play/stage/Bopper.hx @@ -107,8 +107,8 @@ class Bopper extends StageProp implements IPlayStateScriptedClass if (this.animation != null) { - this.animation.callback = this.onAnimationFrame; - this.animation.finishCallback = this.onAnimationFinished; + this.animation.onFrameChange.add(this.onAnimationFrame); + this.animation.onFinish.add(this.onAnimationFinished); } } diff --git a/source/funkin/ui/haxeui/components/CharacterPlayer.hx b/source/funkin/ui/haxeui/components/CharacterPlayer.hx index def110e8e..95b81bfcf 100644 --- a/source/funkin/ui/haxeui/components/CharacterPlayer.hx +++ b/source/funkin/ui/haxeui/components/CharacterPlayer.hx @@ -100,16 +100,12 @@ class CharacterPlayer extends Box if (flip) character.flipX = !character.flipX; if (targetScale != 1.0) character.setScale(targetScale); - character.animation.callback = function(name:String = '', frameNumber:Int = -1, frameIndex:Int = -1) { - @:privateAccess - character.onAnimationFrame(name, frameNumber, frameIndex); + character.animation.onFrameChange.add(function(name:String = '', frameNumber:Int = -1, frameIndex:Int = -1) { dispatch(new AnimationEvent(AnimationEvent.FRAME)); - }; - character.animation.finishCallback = function(name:String = '') { - @:privateAccess - character.onAnimationFinished(name); + }); + character.animation.onFinish.add(function(name:String = '') { dispatch(new AnimationEvent(AnimationEvent.END)); - }; + }); add(character); invalidateComponentLayout();