diff --git a/Project.xml b/Project.xml index fae9c768b..8eb62bb1d 100644 --- a/Project.xml +++ b/Project.xml @@ -2,7 +2,7 @@ - + diff --git a/assets b/assets index 859186eea..94db49cd4 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 859186eea46c8b70deb3530c25304ba875b7b34a +Subproject commit 94db49cd4a2acacd5089628619104830a4f1ffce diff --git a/source/funkin/InitState.hx b/source/funkin/InitState.hx index 254165a95..6e370b5ff 100644 --- a/source/funkin/InitState.hx +++ b/source/funkin/InitState.hx @@ -239,8 +239,13 @@ class InitState extends FlxState combo: 69, maxCombo: 69, totalNotesHit: 140, - totalNotes: 240 // 0, + totalNotes: 190 } + // 2000 = loss + // 240 = good + // 230 = great + // 210 = excellent + // 190 = perfect }, })); #elseif ANIMDEBUG diff --git a/source/funkin/data/freeplay/player/PlayerData.hx b/source/funkin/data/freeplay/player/PlayerData.hx index caae2adc6..f6c085018 100644 --- a/source/funkin/data/freeplay/player/PlayerData.hx +++ b/source/funkin/data/freeplay/player/PlayerData.hx @@ -223,6 +223,10 @@ typedef PlayerResultsAnimationData = @:default('') var startFrameLabel:Null; + @:optional + @:default(true) + var looped:Bool; + @:optional var loopFrame:Null; diff --git a/source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx b/source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx index 1684e8b33..eb331b9c3 100644 --- a/source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx +++ b/source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx @@ -158,6 +158,10 @@ class FlxAtlasSprite extends FlxAnimate } }; + anim.onComplete = function() { + onAnimationFinish.dispatch(id); + }; + // Prevent other animations from playing if `ignoreOther` is true. if (ignoreOther) canPlayOtherAnims = false; diff --git a/source/funkin/play/ResultState.hx b/source/funkin/play/ResultState.hx index 042ab655d..c2d9d42b3 100644 --- a/source/funkin/play/ResultState.hx +++ b/source/funkin/play/ResultState.hx @@ -61,7 +61,8 @@ class ResultState extends MusicBeatSubState var characterAtlasAnimations:Array< { sprite:FlxAtlasSprite, - delay:Float + delay:Float, + forceLoop:Bool }> = []; var characterSparrowAnimations:Array< { @@ -185,7 +186,17 @@ class ResultState extends MusicBeatSubState animation.scale.set(animData.scale ?? 1.0, animData.scale ?? 1.0); - if (animData.loopFrameLabel != null) + if (!(animData.looped ?? true)) + { + // Animation is not looped. + animation.onAnimationFinish.add((_name:String) -> { + if (animation != null) + { + animation.anim.pause(); + } + }); + } + else if (animData.loopFrameLabel != null) { animation.onAnimationFinish.add((_name:String) -> { if (animation != null) @@ -211,7 +222,8 @@ class ResultState extends MusicBeatSubState characterAtlasAnimations.push( { sprite: animation, - delay: animData.delay ?? 0.0 + delay: animData.delay ?? 0.0, + forceLoop: (animData.loopFrame ?? -1) == 0 }); // Add to the scene. add(animation);