Fix an issue where Pico's retry animation is broken on Ugh/Guns Pico Mix
This commit is contained in:
committed by
Cameron Taylor
parent
0a7bd3111f
commit
9ff14aed42
+1
-1
Submodule assets updated: 96efb6e837...23a23165c1
@@ -247,8 +247,8 @@ class DialogueBox extends FlxSpriteGroup implements IDialogueScriptedClass imple
|
||||
var animNames:Array<String> = 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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user