From e618fbc64f99b9d306a9fb2a07886892180a07ab Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 7 Aug 2023 12:33:12 -0400 Subject: [PATCH] bouncing thingie --- source/funkin/freeplayStuff/LetterSort.hx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/source/funkin/freeplayStuff/LetterSort.hx b/source/funkin/freeplayStuff/LetterSort.hx index 278500da8..68eeeab33 100644 --- a/source/funkin/freeplayStuff/LetterSort.hx +++ b/source/funkin/freeplayStuff/LetterSort.hx @@ -33,6 +33,8 @@ class LetterSort extends FlxTypedSpriteGroup for (i in 0...5) { var letter:FreeplayLetter = new FreeplayLetter(i * 80, 0, i); + letter.x += 50; + letter.y += 50; letter.ogY = y; add(letter); @@ -40,7 +42,10 @@ class LetterSort extends FlxTypedSpriteGroup if (i != 2) letter.scale.x = letter.scale.y = 0.8; else - letter.scale.x = letter.scale.y = 1.1; + { + // letter.x += 10; + // letter.scale.x = letter.scale.y = 1.1; + } var darkness:Float = Math.abs(i - 2) / 6; @@ -89,11 +94,11 @@ class LetterSort extends FlxTypedSpriteGroup } curSelection += diff; - if (curSelection < 0) curSelection = letters.length - 1; - if (curSelection >= letters.length) curSelection = 0; + if (curSelection < 0) curSelection = letters[0].arr.length - 1; + if (curSelection >= letters[0].arr.length) curSelection = 0; for (letter in letters) - letter.changeLetter(diff, curSelection); + letter.changeLetter(diff, curSelection + 2); if (changeSelectionCallback != null) changeSelectionCallback(letters[2].arr[letters[2].curLetter]); // bullshit and long lol! } @@ -132,7 +137,8 @@ class FreeplayLetter extends FlxAtlasSprite if (letterInd != null) { - this.anim.play(arr[letterInd]); + this.anim.play(arr[letterInd] + " move"); + this.anim.pause(); curLetter = letterInd; } } @@ -144,6 +150,8 @@ class FreeplayLetter extends FlxAtlasSprite if (curLetter < 0) curLetter = arr.length - 1; if (curLetter >= arr.length) curLetter = 0; - this.anim.play(arr[curLetter]); + this.anim.play(arr[curLetter] + " move"); + if (curSelection != curLetter) this.anim.pause(); + updateHitbox(); } }