From fc5c57f73119625d2f02a5d93284ed97aa802ffb Mon Sep 17 00:00:00 2001 From: TheZoroForce240 <86524550+TheZoroForce240@users.noreply.github.com> Date: Wed, 28 Aug 2024 21:57:48 +0100 Subject: [PATCH] offset strum y to center and adjust fade tween to match keycount --- source/funkin/editors/charter/CharterPreviewStrumLine.hx | 2 +- source/funkin/game/StrumLine.hx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/funkin/editors/charter/CharterPreviewStrumLine.hx b/source/funkin/editors/charter/CharterPreviewStrumLine.hx index afcc4d43..91aa5cca 100644 --- a/source/funkin/editors/charter/CharterPreviewStrumLine.hx +++ b/source/funkin/editors/charter/CharterPreviewStrumLine.hx @@ -52,7 +52,7 @@ class CharterPreviewStrumLine extends FlxTypedGroup var strum = members[i]; strum.x = CoolUtil.fpsLerp(strum.x, x + (Note.swagWidth * scale * spacing * i), 0.2); - strum.y = CoolUtil.fpsLerp(strum.y, y, 0.2); + strum.y = CoolUtil.fpsLerp(strum.y, y + (Note.swagWidth*0.5) - (Note.swagWidth * scale * 0.5), 0.2); strum.scale.x = strum.scale.y = CoolUtil.fpsLerp(strum.scale.x, 0.7 * scale, 0.2); strum.updateHitbox(); } diff --git a/source/funkin/game/StrumLine.hx b/source/funkin/game/StrumLine.hx index 9c322b78..4cbec464 100644 --- a/source/funkin/game/StrumLine.hx +++ b/source/funkin/game/StrumLine.hx @@ -307,7 +307,7 @@ class StrumLine extends FlxTypedGroup { public function createStrum(i:Int, ?animPrefix:String) { if (animPrefix == null) animPrefix = strumAnimPrefix[i % strumAnimPrefix.length]; - var babyArrow:Strum = new Strum(startingPos.x + (Note.swagWidth * strumScale * (data.strumSpacing != null ? data.strumSpacing : 1) * i), startingPos.y); + var babyArrow:Strum = new Strum(startingPos.x + (Note.swagWidth * strumScale * (data.strumSpacing != null ? data.strumSpacing : 1) * i), startingPos.y + (Note.swagWidth*0.5) - (Note.swagWidth * strumScale * 0.5)); babyArrow.ID = i; babyArrow.strumLine = this; @@ -341,7 +341,7 @@ class StrumLine extends FlxTypedGroup { { babyArrow.y -= 10; babyArrow.alpha = 0; - FlxTween.tween(babyArrow, {y: babyArrow.y + 10, alpha: 1}, 1, {ease: FlxEase.circOut, startDelay: 0.5 + (0.2 * i)}); + FlxTween.tween(babyArrow, {y: babyArrow.y + 10, alpha: 1}, 1, {ease: FlxEase.circOut, startDelay: 0.5 + (0.2 * i * (4 / (data.keyCount != null ? data.keyCount : 4)))}); } babyArrow.playAnim('static');