mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
freeplay menu shit in progres animation
This commit is contained in:
parent
7e1dfd67d3
commit
83ddb13f71
2 changed files with 25 additions and 6 deletions
|
@ -1879,13 +1879,13 @@ class PlayState extends MusicBeatState
|
||||||
camHUD.visible = !camHUD.visible;
|
camHUD.visible = !camHUD.visible;
|
||||||
if (FlxG.keys.justPressed.K)
|
if (FlxG.keys.justPressed.K)
|
||||||
{
|
{
|
||||||
@:privateAccess
|
// @:privateAccess
|
||||||
var funnyData:Array<Int> = cast FlxG.sound.music._channel.__source.buffer.data;
|
// var funnyData:Array<Int> = cast FlxG.sound.music._channel.__source.buffer.data;
|
||||||
|
|
||||||
funnyData.reverse();
|
// funnyData.reverse();
|
||||||
|
|
||||||
@:privateAccess
|
// @:privateAccess
|
||||||
FlxG.sound.music._channel.__source.buffer.data = cast funnyData;
|
// FlxG.sound.music._channel.__source.buffer.data = cast funnyData;
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
|
|
@ -42,11 +42,30 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
selected = selected; // just to kickstart the set_selected
|
selected = selected; // just to kickstart the set_selected
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var frameTicker:Float = 0;
|
||||||
|
var frameTypeBeat:Int = 0;
|
||||||
|
|
||||||
|
var xFrames:Array<Float> = [1.6, 1.8, 0.85, 0.85, 0.97, 0.97, 1];
|
||||||
|
var xPosLerpLol:Array<Float> = [0.8, 0.4, 0.16, 0.16, 0.22, 0.22, 0.245]; // NUMBERS ARE JANK CUZ THE SCALING OR WHATEVER
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
if (doLerp)
|
if (doLerp)
|
||||||
{
|
{
|
||||||
x = CoolUtil.coolLerp(x, targetPos.x, 0.3);
|
frameTicker += elapsed;
|
||||||
|
|
||||||
|
if (frameTicker >= 1 / 24 && frameTypeBeat < xFrames.length)
|
||||||
|
{
|
||||||
|
frameTicker = 0;
|
||||||
|
|
||||||
|
scale.x = xFrames[frameTypeBeat];
|
||||||
|
scale.y = 1 / xFrames[frameTypeBeat];
|
||||||
|
x = FlxG.width * xPosLerpLol[Std.int(Math.min(frameTypeBeat, xPosLerpLol.length - 1))];
|
||||||
|
|
||||||
|
frameTypeBeat += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// x = CoolUtil.coolLerp(x, targetPos.x, 0.3);
|
||||||
y = CoolUtil.coolLerp(y, targetPos.y, 0.4);
|
y = CoolUtil.coolLerp(y, targetPos.y, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue