1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-09-12 05:07:06 +00:00

tween in fixed

This commit is contained in:
Cameron Taylor 2023-08-04 17:10:27 -04:00 committed by EliteMasterEric
parent 9571eb70e0
commit 84f908fbde
2 changed files with 9 additions and 3 deletions

View file

@ -494,7 +494,8 @@ class FreeplayState extends MusicBeatSubState
for (i in 0...tempSongs.length)
{
var funnyMenu:SongMenuItem = new SongMenuItem(FlxG.width, (i * 150) + 160, tempSongs[i].songName);
var funnyMenu:SongMenuItem = new SongMenuItem(FlxG.width, 0, tempSongs[i].songName);
funnyMenu.y = funnyMenu.intendedY(i + 1) + 10;
funnyMenu.targetPos.x = funnyMenu.x;
funnyMenu.ID = i;
funnyMenu.alpha = 0.5;
@ -974,7 +975,7 @@ class FreeplayState extends MusicBeatSubState
capsule.selected = false;
capsule.targetPos.y = ((index - curSelected) * ((capsule.height * capsule.realScaled) + 10)) + 160;
capsule.targetPos.y = capsule.intendedY(index - curSelected);
capsule.targetPos.x = 270 + (60 * (Math.sin(index - curSelected)));
// capsule.targetPos.x = 320 + (40 * (index - curSelected));

View file

@ -38,7 +38,7 @@ class SongMenuItem extends FlxSpriteGroup
// capsule.animation
add(capsule);
songText = new FlxText(capsule.width * 0.1, 40, 0, songTitle, Std.int(40 * realScaled));
songText = new FlxText(capsule.width * 0.23, 40, 0, songTitle, Std.int(40 * realScaled));
songText.font = "5by7";
songText.color = 0xFF43C1EA;
add(songText);
@ -114,6 +114,11 @@ class SongMenuItem extends FlxSpriteGroup
super.update(elapsed);
}
public function intendedY(index:Int):Float
{
return (index * ((height * realScaled) + 10)) + 160;
}
function set_selected(value:Bool):Bool
{
// trace(value);