offset strum y to center and adjust fade tween to match keycount

This commit is contained in:
TheZoroForce240
2024-08-28 21:57:48 +01:00
parent 5f7913affb
commit fc5c57f731
2 changed files with 3 additions and 3 deletions
@@ -52,7 +52,7 @@ class CharterPreviewStrumLine extends FlxTypedGroup<FlxSprite>
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();
}
+2 -2
View File
@@ -307,7 +307,7 @@ class StrumLine extends FlxTypedGroup<Strum> {
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<Strum> {
{
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');