capsule jump in
This commit is contained in:
@@ -776,12 +776,10 @@ class FreeplayState extends MusicBeatSubState
|
||||
funnyMenu.hsvShader = hsvShader;
|
||||
funnyMenu.newText.animation.curAnim.curFrame = 45 - ((i * 4) % 45);
|
||||
|
||||
// This stops the bounce-in animation.
|
||||
// I would like to use to use the jump in now that it looks better,
|
||||
// but I still can't because switching from harder to normal difficulties causes the x positions to mess up
|
||||
/*if (fromCharSelect)*/ funnyMenu.forcePosition();
|
||||
/*else
|
||||
funnyMenu.initJumpIn(0, force); */
|
||||
// Stops the bounce-in animation when returning to freeplay from the character selection screen.
|
||||
if (fromCharSelect) funnyMenu.forcePosition();
|
||||
else
|
||||
funnyMenu.initJumpIn(0, force);
|
||||
|
||||
grpCapsules.add(funnyMenu);
|
||||
}
|
||||
@@ -2088,6 +2086,8 @@ class FreeplayState extends MusicBeatSubState
|
||||
|
||||
capsule.selected = index == curSelected + 1;
|
||||
|
||||
if (index > 1) capsule.curSelected = curSelected;
|
||||
|
||||
capsule.targetPos.y = capsule.intendedY(index - curSelected);
|
||||
capsule.targetPos.x = capsule.intendedX(index - curSelected);
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ class SongMenuItem extends FlxSpriteGroup
|
||||
var sparkleTimer:FlxTimer;
|
||||
|
||||
var index:Int;
|
||||
public var curSelected:Int;
|
||||
|
||||
public function new(x:Float, y:Float)
|
||||
{
|
||||
@@ -615,11 +616,13 @@ class SongMenuItem extends FlxSpriteGroup
|
||||
capsule.scale.y *= realScaled;
|
||||
|
||||
frameInTypeBeat += 1;
|
||||
// Move the targetPos set to the if statement below if you want them to shift to their target positions after jumping in instead
|
||||
// I have no idea why this if instead of frameInTypeBeat == xFrames.length works even though they're the same thing
|
||||
if (targetPos.x <= 320) targetPos.x = intendedX(index - curSelected);
|
||||
}
|
||||
else if (frameInTypeBeat == xFrames.length)
|
||||
{
|
||||
doJumpIn = false;
|
||||
targetPos.x = intendedX(index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user