easy charts

This commit is contained in:
Cameron Taylor
2020-10-31 20:22:49 -07:00
parent 11872c3fce
commit 0035f9a506
10 changed files with 67 additions and 19 deletions

View File

@ -17,6 +17,10 @@ class Alphabet extends FlxSpriteGroup
public var delay:Float = 0.05;
public var paused:Bool = false;
// for menu shit
public var targetY:Float = 0;
public var isMenuItem:Bool = false;
public var text:String = "";
var _finalText:String = "";
@ -207,6 +211,14 @@ class Alphabet extends FlxSpriteGroup
override function update(elapsed:Float)
{
if (isMenuItem)
{
var scaledY = FlxMath.remapToRange(targetY, 0, 1, 0, 1.3);
y = FlxMath.lerp(y, (scaledY * 120) + (FlxG.height * 0.48), 0.16);
x = FlxMath.lerp(x, (targetY * 20) + 90, 0.16);
}
super.update(elapsed);
}
}