mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-28 15:57:42 +00:00
loading screen interactivity
This commit is contained in:
parent
e1a6325e02
commit
7c120efc66
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue