mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-23 07:15:12 +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 danceLeft = false;
|
||||||
|
|
||||||
var loadBar:FlxSprite;
|
var loadBar:FlxSprite;
|
||||||
|
var funkay:FlxSprite;
|
||||||
|
|
||||||
function new(target:FlxState, stopMusic:Bool)
|
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);
|
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, 0xFFcaff4d);
|
||||||
add(bg);
|
add(bg);
|
||||||
|
|
||||||
var funkay:FlxSprite = new FlxSprite();
|
funkay = new FlxSprite();
|
||||||
funkay.loadGraphic(Paths.image('funkay'));
|
funkay.loadGraphic(Paths.image('funkay'));
|
||||||
funkay.setGraphicSize(0, FlxG.height);
|
funkay.setGraphicSize(0, FlxG.height);
|
||||||
funkay.updateHitbox();
|
funkay.updateHitbox();
|
||||||
|
@ -124,6 +125,19 @@ class LoadingState extends MusicBeatState
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
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)
|
if (callbacks != null)
|
||||||
{
|
{
|
||||||
targetShit = FlxMath.remapToRange(callbacks.numRemaining / callbacks.length, 1, 0, 0, 1);
|
targetShit = FlxMath.remapToRange(callbacks.numRemaining / callbacks.length, 1, 0, 0, 1);
|
||||||
|
|
Loading…
Reference in a new issue