From f314fe3a4b1fa994f9111d18156c65203bc42b07 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 15 Jul 2021 18:22:15 -0400 Subject: [PATCH] wombo combo --- source/ComboCounter.hx | 8 ++++++++ source/PlayState.hx | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/source/ComboCounter.hx b/source/ComboCounter.hx index e2be5539a..58a454aa4 100644 --- a/source/ComboCounter.hx +++ b/source/ComboCounter.hx @@ -34,8 +34,16 @@ class ComboCounter extends FlxTypedSpriteGroup // add(grpNumbers); } + public function forceFinish():Void + { + effectStuff.animation.play('funny', true, false, 18); + } + override function update(elapsed:Float) { + if (effectStuff.animation.curAnim.curFrame == 17) + effectStuff.animation.pause(); + if (effectStuff.animation.curAnim.curFrame == 2 && !wasComboSetup) { setupCombo(daCombo); diff --git a/source/PlayState.hx b/source/PlayState.hx index 8bb078d0f..ae2eaa8dd 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -3014,7 +3014,16 @@ class PlayState extends MusicBeatState && !SONG.notes[Math.floor(curStep / 16) + 1].mustHitSection) { var animShit:ComboCounter = new ComboCounter(-100, 300, combo); + animShit.scrollFactor.set(0.6, 0.6); add(animShit); + + var frameShit:Float = (1 / 24) * 2; // equals 2 frames in the animation + + new FlxTimer().start(((Conductor.crochet / 1000) * 1.25) - frameShit, function(tmr) + + { + animShit.forceFinish(); + }); } if (curBeat % gfSpeed == 0)