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

loading screen interactivity

This commit is contained in:
Cameron Taylor 2021-04-18 04:28:50 -04:00
parent e1a6325e02
commit 7c120efc66

View file

@ -25,6 +25,7 @@ class LoadingState extends MusicBeatState
var danceLeft = false;
var loadBar:FlxSprite;
var funkay:FlxSprite;
function new(target:FlxState, stopMusic:Bool)
{
@ -38,7 +39,7 @@ class LoadingState extends MusicBeatState
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, 0xFFcaff4d);
add(bg);
var funkay:FlxSprite = new FlxSprite();
funkay = new FlxSprite();
funkay.loadGraphic(Paths.image('funkay'));
funkay.setGraphicSize(0, FlxG.height);
funkay.updateHitbox();
@ -124,6 +125,19 @@ class LoadingState extends MusicBeatState
{
super.update(elapsed);
funkay.setGraphicSize(Std.int(FlxMath.lerp(FlxG.width * 0.88, funkay.width, 0.95)));
funkay.updateHitbox();
// funkay.updateHitbox();
if (controls.ACCEPT)
{
funkay.setGraphicSize(Std.int(funkay.width + 60));
funkay.updateHitbox();
// funkay.setGraphicSize(0, Std.int(funkay.height + 50));
// funkay.updateHitbox();
// funkay.screenCenter();
}
if (callbacks != null)
{
targetShit = FlxMath.remapToRange(callbacks.numRemaining / callbacks.length, 1, 0, 0, 1);