diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index bb1cc5c6f..7835132ce 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -75,6 +75,11 @@ class FreeplayState extends MusicBeatState changeSelection(1); } + if (controls.BACK) + { + FlxG.switchState(new StoryMenuState()); + } + if (accepted) { PlayState.SONG = Song.loadFromJson(songs[curSelected].toLowerCase(), songs[curSelected].toLowerCase()); diff --git a/source/PlayState.hx b/source/PlayState.hx index 4e01c2fbb..1386546f7 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -593,7 +593,7 @@ class PlayState extends MusicBeatState if (FlxG.keys.justPressed.ESCAPE) { - FlxG.switchState(new ChartingState()); + // FlxG.switchState(new ChartingState()); } // FlxG.watch.addQuick('VOL', vocals.amplitudeLeft); @@ -609,8 +609,8 @@ class PlayState extends MusicBeatState /* if (FlxG.keys.justPressed.NINE) FlxG.switchState(new Charting()); */ - if (FlxG.keys.justPressed.EIGHT) - FlxG.switchState(new AnimationDebug(SONG.player2)); + // if (FlxG.keys.justPressed.EIGHT) + // FlxG.switchState(new AnimationDebug(SONG.player2)); if (startingSong) { diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 5554fbe13..b0fbb5e34 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -19,7 +19,7 @@ class StoryMenuState extends MusicBeatState var weekData:Array = [['Tutorial', 'Bopeebo', 'Fresh', 'Dadbattle'], ['Spookeez', 'South']]; var curDifficulty:Int = 1; - public static var weekUnlocked:Array = [true, true]; + public static var weekUnlocked:Array = [true, false]; var weekCharacters:Array = [['dad', 'bf', 'gf'], ['spooky', 'bf', 'gf']]; var curWeek:Int = 0; diff --git a/source/TitleState.hx b/source/TitleState.hx index 72cae1944..c8f98ccaf 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -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) @@ -84,26 +94,47 @@ class TitleState extends MusicBeatState FlxG.sound.music.fadeIn(4, 0, 0.7); } + 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(-100, -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; add(logoBl); + 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); + + titleText = new FlxSprite(); + 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'); + 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); @@ -155,6 +186,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 +244,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)