diff --git a/source/GameOverState.hx b/source/GameOverState.hx index 57c60d1f93..c26c063314 100644 --- a/source/GameOverState.hx +++ b/source/GameOverState.hx @@ -23,12 +23,12 @@ class GameOverState extends FlxTransitionableState override function create() { - /* var loser:FlxSprite = new FlxSprite(100, 100); - var loseTex = FlxAtlasFrames.fromSparrow(AssetPaths.lose.png, AssetPaths.lose.xml); + var loser:FlxSprite = new FlxSprite(100, 100); + var loseTex = Paths.getSparrowAtlas('lose'); loser.frames = loseTex; loser.animation.addByPrefix('lose', 'lose', 24, false); loser.animation.play('lose'); - // add(loser); */ + add(loser); var bf:Boyfriend = new Boyfriend(bfX, bfY); // bf.scrollFactor.set(); @@ -36,18 +36,18 @@ class GameOverState extends FlxTransitionableState bf.playAnim('firstDeath'); FlxG.camera.follow(bf, LOCKON, 0.001); - /* - var restart:FlxSprite = new FlxSprite(500, 50).loadGraphic(AssetPaths.restart.png); + + var restart:FlxSprite = new FlxSprite(500, 50).loadGraphic(Paths.image('restart')); restart.setGraphicSize(Std.int(restart.width * 0.6)); restart.updateHitbox(); restart.alpha = 0; restart.antialiasing = true; - // add(restart); */ + add(restart); FlxG.sound.music.fadeOut(2, FlxG.sound.music.volume * 0.6); - // FlxTween.tween(restart, {alpha: 1}, 1, {ease: FlxEase.quartInOut}); - // FlxTween.tween(restart, {y: restart.y + 40}, 7, {ease: FlxEase.quartInOut, type: PINGPONG}); + FlxTween.tween(restart, {alpha: 1}, 1, {ease: FlxEase.quartInOut}); + FlxTween.tween(restart, {y: restart.y + 40}, 7, {ease: FlxEase.quartInOut, type: PINGPONG}); super.create(); } diff --git a/source/GameOverSubstate.hx b/source/GameOverSubstate.hx index 1a2752e928..f784827f17 100644 --- a/source/GameOverSubstate.hx +++ b/source/GameOverSubstate.hx @@ -18,12 +18,9 @@ class GameOverSubstate extends MusicBeatSubstate { var daStage = PlayState.curStage; var daBf:String = ''; - switch (daStage) + switch (PlayState.SONG.player1) { - case 'school': - stageSuffix = '-pixel'; - daBf = 'bf-pixel-dead'; - case 'schoolEvil': + case 'bf-pixel': stageSuffix = '-pixel'; daBf = 'bf-pixel-dead'; default: diff --git a/source/KadeEngineData.hx b/source/KadeEngineData.hx index 7978a418b1..925eb3d513 100644 --- a/source/KadeEngineData.hx +++ b/source/KadeEngineData.hx @@ -63,6 +63,9 @@ class KadeEngineData if (FlxG.save.data.distractions == null) FlxG.save.data.distractions = true; + if (FlxG.save.data.flashing == null) + FlxG.save.data.flashing = true; + Conductor.recalculateTimings(); Main.watermarks = FlxG.save.data.watermark; diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index d57308b71f..4957316580 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -163,8 +163,10 @@ class MainMenuState extends MusicBeatState { selectedSomethin = true; FlxG.sound.play(Paths.sound('confirmMenu')); - - FlxFlicker.flicker(magenta, 1.1, 0.15, false); + + if(FlxG.save.data.flashing){ + FlxFlicker.flicker(magenta, 1.1, 0.15, false); + } menuItems.forEach(function(spr:FlxSprite) { diff --git a/source/MenuItem.hx b/source/MenuItem.hx index 44353f8bb1..6d08a95001 100644 --- a/source/MenuItem.hx +++ b/source/MenuItem.hx @@ -37,13 +37,14 @@ class MenuItem extends FlxSpriteGroup { super.update(elapsed); y = FlxMath.lerp(y, (targetY * 120) + 480, 0.17 * (60 / FlxG.save.data.fpsCap)); - - if (isFlashing) - flashingInt += 1; - - if (flashingInt % fakeFramerate >= Math.floor(fakeFramerate / 2)) - week.color = 0xFF33ffff; - else - week.color = FlxColor.WHITE; + if(FlxG.save.data.flashing){ + if (isFlashing) + flashingInt += 1; + + if (flashingInt % fakeFramerate >= Math.floor(fakeFramerate / 2)) + week.color = 0xFF33ffff; + else + week.color = FlxColor.WHITE; + } } } diff --git a/source/Options.hx b/source/Options.hx index 3d9c2cd50f..c7cfa545b0 100644 --- a/source/Options.hx +++ b/source/Options.hx @@ -202,6 +202,26 @@ class DistractionsAndEffectsOption extends Option } } +class FlashingLightsOption extends Option +{ + public function new(desc:String) + { + super(); + description = desc; + } + public override function press():Bool + { + FlxG.save.data.flashing = !FlxG.save.data.flashing; + display = updateDisplay(); + return true; + } + + private override function updateDisplay():String + { + return "Flashing Lights " + (!FlxG.save.data.flashing ? "off" : "on"); + } +} + class Judgement extends Option { diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index 13ccdc9113..5c31e56860 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -22,26 +22,36 @@ class OptionsMenu extends MusicBeatState var options:Array = [ new OptionCatagory("Gameplay", [ new DFJKOption(controls), + new DownscrollOption("Change the layout of the strumline."), new GhostTapOption("Ghost Tapping is when you tap a direction and it doesn't give you a miss."), new Judgement("Customize your Hit Timings (LEFT or RIGHT)"), #if desktop new FPSCapOption("Cap your FPS (Left for -10, Right for +10. SHIFT to go faster)"), #end - new ScrollSpeedOption("Change your scroll speed (Left for -0.1, right for +0.1. If its at 1, it will be chart dependent)"), + new ScrollSpeedOption("Change your scroll speed (Left for -0.1, right for +0.1. If it's at 1, it will be chart dependent)"), new AccuracyDOption("Change how accuracy is calculated. (Accurate = Simple, Complex = Milisecond Based)"), // new OffsetMenu("Get a note offset based off of your inputs!"), new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference") ]), new OptionCatagory("Appearance", [ - new SongPositionOption("Show the songs current position (as a bar)"), - new DownscrollOption("Change the layout of the strumline."), - new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay."), #if desktop - new RainbowFPSOption("Make the FPS Counter Rainbow (Only works with the FPS Counter toggled on)"), + new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay."), + new RainbowFPSOption("Make the FPS Counter Rainbow (Only works with the FPS Counter toggled on and Flashing Lights toggled off)") + #else + new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay.") #end + ]), + + new OptionCatagory("Indicators, Notices, and Displays", [ new AccuracyOption("Display accuracy information."), - new NPSDisplayOption("Shows your current Notes Per Second.") + new NPSDisplayOption("Shows your current Notes Per Second."), + new SongPositionOption("Show the songs current position (as a bar)"), ]), + + new OptionCatagory("Health and Safety", [ + new FlashingLightsOption("Toggle flashing lights that can cause epileptic seizures and strain.") + ]), + new OptionCatagory("Misc", [ #if desktop