ng release and blank controls
This commit is contained in:
@ -8,6 +8,7 @@ import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond;
|
||||
import flixel.addons.transition.FlxTransitionableState;
|
||||
import flixel.addons.transition.TransitionData;
|
||||
import flixel.graphics.FlxGraphic;
|
||||
import flixel.graphics.frames.FlxAtlasFrames;
|
||||
import flixel.group.FlxGroup;
|
||||
import flixel.input.gamepad.FlxGamepad;
|
||||
import flixel.math.FlxPoint;
|
||||
@ -53,6 +54,10 @@ class TitleState extends MusicBeatState
|
||||
|
||||
super.create();
|
||||
|
||||
#if (!debug && NG_LOGIN)
|
||||
var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey);
|
||||
#end
|
||||
|
||||
#if SKIP_TO_PLAYSTATE
|
||||
FlxG.switchState(new StoryMenuState());
|
||||
#else
|
||||
@ -60,6 +65,11 @@ class TitleState extends MusicBeatState
|
||||
#end
|
||||
}
|
||||
|
||||
var logoBl:FlxSprite;
|
||||
var gfDance:FlxSprite;
|
||||
var danceLeft:Bool = false;
|
||||
var titleText:FlxSprite;
|
||||
|
||||
function startIntro()
|
||||
{
|
||||
if (!initialized)
|
||||
@ -82,28 +92,58 @@ class TitleState extends MusicBeatState
|
||||
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt, 0);
|
||||
|
||||
FlxG.sound.music.fadeIn(4, 0, 0.7);
|
||||
|
||||
FlxG.save.bind('funkin', 'ninjamuffin99');
|
||||
|
||||
if (FlxG.save.data.weekUnlocked != null)
|
||||
{
|
||||
StoryMenuState.weekUnlocked = FlxG.save.data.weekUnlocked;
|
||||
}
|
||||
}
|
||||
|
||||
Conductor.changeBPM(102);
|
||||
persistentUpdate = true;
|
||||
|
||||
var bg:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.stageback__png);
|
||||
bg.antialiasing = true;
|
||||
bg.setGraphicSize(Std.int(bg.width * 0.6));
|
||||
bg.updateHitbox();
|
||||
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
|
||||
// bg.antialiasing = true;
|
||||
// bg.setGraphicSize(Std.int(bg.width * 0.6));
|
||||
// bg.updateHitbox();
|
||||
add(bg);
|
||||
|
||||
var logoBl:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.logo__png);
|
||||
logoBl.screenCenter();
|
||||
logoBl.color = FlxColor.BLACK;
|
||||
logoBl = new FlxSprite(-150, -100);
|
||||
logoBl.frames = FlxAtlasFrames.fromSparrow(AssetPaths.logoBumpin__png, AssetPaths.logoBumpin__xml);
|
||||
logoBl.antialiasing = true;
|
||||
logoBl.animation.addByPrefix('bump', 'logo bumpin', 24);
|
||||
logoBl.animation.play('bump');
|
||||
logoBl.updateHitbox();
|
||||
// logoBl.screenCenter();
|
||||
// logoBl.color = FlxColor.BLACK;
|
||||
|
||||
gfDance = new FlxSprite(FlxG.width * 0.4, FlxG.height * 0.07);
|
||||
gfDance.frames = FlxAtlasFrames.fromSparrow(AssetPaths.gfDanceTitle__png, AssetPaths.gfDanceTitle__xml);
|
||||
gfDance.animation.addByIndices('danceLeft', 'gfDance', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false);
|
||||
gfDance.animation.addByIndices('danceRight', 'gfDance', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false);
|
||||
gfDance.antialiasing = true;
|
||||
add(gfDance);
|
||||
add(logoBl);
|
||||
|
||||
titleText = new FlxSprite(100, FlxG.height * 0.8);
|
||||
titleText.frames = FlxAtlasFrames.fromSparrow(AssetPaths.titleEnter__png, AssetPaths.titleEnter__xml);
|
||||
titleText.animation.addByPrefix('idle', "Press Enter to Begin", 24);
|
||||
titleText.animation.addByPrefix('press', "ENTER PRESSED", 24);
|
||||
titleText.antialiasing = true;
|
||||
titleText.animation.play('idle');
|
||||
titleText.updateHitbox();
|
||||
// titleText.screenCenter(X);
|
||||
add(titleText);
|
||||
|
||||
var logo:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.logo__png);
|
||||
logo.screenCenter();
|
||||
logo.antialiasing = true;
|
||||
add(logo);
|
||||
// add(logo);
|
||||
|
||||
FlxTween.tween(logoBl, {y: logoBl.y + 50}, 0.6, {ease: FlxEase.quadInOut, type: PINGPONG});
|
||||
FlxTween.tween(logo, {y: logoBl.y + 50}, 0.6, {ease: FlxEase.quadInOut, type: PINGPONG, startDelay: 0.1});
|
||||
// FlxTween.tween(logoBl, {y: logoBl.y + 50}, 0.6, {ease: FlxEase.quadInOut, type: PINGPONG});
|
||||
// FlxTween.tween(logo, {y: logoBl.y + 50}, 0.6, {ease: FlxEase.quadInOut, type: PINGPONG, startDelay: 0.1});
|
||||
|
||||
credGroup = new FlxGroup();
|
||||
add(credGroup);
|
||||
@ -129,6 +169,8 @@ class TitleState extends MusicBeatState
|
||||
|
||||
FlxTween.tween(credTextShit, {y: credTextShit.y + 20}, 2.9, {ease: FlxEase.quadInOut, type: PINGPONG});
|
||||
|
||||
FlxG.mouse.visible = false;
|
||||
|
||||
if (initialized)
|
||||
skipIntro();
|
||||
else
|
||||
@ -155,6 +197,9 @@ class TitleState extends MusicBeatState
|
||||
|
||||
if (pressedEnter && !transitioning && skippedIntro)
|
||||
{
|
||||
NGio.unlockMedal(60960);
|
||||
titleText.animation.play('press');
|
||||
|
||||
FlxG.camera.flash(FlxColor.WHITE, 1);
|
||||
FlxG.sound.play('assets/sounds/confirmMenu' + TitleState.soundExt, 0.7);
|
||||
|
||||
@ -210,6 +255,14 @@ class TitleState extends MusicBeatState
|
||||
{
|
||||
super.beatHit();
|
||||
|
||||
logoBl.animation.play('bump');
|
||||
danceLeft = !danceLeft;
|
||||
|
||||
if (danceLeft)
|
||||
gfDance.animation.play('danceRight');
|
||||
else
|
||||
gfDance.animation.play('danceLeft');
|
||||
|
||||
FlxG.log.add(curBeat);
|
||||
|
||||
switch (curBeat)
|
||||
|
Reference in New Issue
Block a user