diff --git a/source/ColorpickSubstate.hx b/source/ColorpickSubstate.hx index b39957de5..6123acc9b 100644 --- a/source/ColorpickSubstate.hx +++ b/source/ColorpickSubstate.hx @@ -1,5 +1,6 @@ package; +import flixel.FlxG; import flixel.group.FlxGroup.FlxTypedGroup; import shaderslmfao.ColorSwap; @@ -29,6 +30,12 @@ class ColorpickSubstate extends MusicBeatSubstate override function update(elapsed:Float) { + if (controls.BACK) + { + FlxG.state.closeSubState(); + FlxG.state.openSubState(new OptionsSubState()); + } + if (controls.RIGHT_P) curSelected += 1; if (controls.LEFT_P) diff --git a/source/Note.hx b/source/Note.hx index c39bf8bc1..786a23e53 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -118,6 +118,7 @@ class Note extends FlxSprite colorSwap = new ColorSwap(); shader = colorSwap.shader; + updateColors(); switch (noteData) { @@ -158,7 +159,6 @@ class Note extends FlxSprite } updateHitbox(); - updateColors(); x -= width / 2; diff --git a/source/OptionsSubState.hx b/source/OptionsSubState.hx index 323094b7e..ee27bdfc1 100644 --- a/source/OptionsSubState.hx +++ b/source/OptionsSubState.hx @@ -8,7 +8,7 @@ import flixel.util.FlxColor; class OptionsSubState extends MusicBeatSubstate { - var textMenuItems:Array = ['Master Volume', 'Sound Volume', 'Controls', 'Colors']; + var textMenuItems:Array = ['Master Volume', 'Sound Volume', 'Controls', 'Colors', 'Back']; var selector:FlxSprite; var curSelected:Int = 0; @@ -63,6 +63,9 @@ class OptionsSubState extends MusicBeatSubstate txt.color = FlxColor.YELLOW; }); + if (controls.BACK) + FlxG.switchState(new MainMenuState()); + if (controls.ACCEPT) { switch (textMenuItems[curSelected]) @@ -76,6 +79,8 @@ class OptionsSubState extends MusicBeatSubstate case "Mods": FlxG.state.closeSubState(); FlxG.state.openSubState(new ModdingSubstate()); + case "Back": + FlxG.switchState(new MainMenuState()); } } } diff --git a/source/PlayState.hx b/source/PlayState.hx index afbdc4d82..013a8c2de 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1,8 +1,5 @@ package; -#if desktop -import Discord.DiscordClient; -#end import Section.SwagSection; import Song.SwagSong; import WiggleEffect.WiggleEffectType; @@ -41,9 +38,14 @@ import lime.utils.Assets; import openfl.display.BlendMode; import openfl.display.StageQuality; import openfl.filters.ShaderFilter; +import shaderslmfao.ColorSwap; using StringTools; +#if desktop +import Discord.DiscordClient; +#end + class PlayState extends MusicBeatState { public static var curStage:String = ''; @@ -1189,6 +1191,9 @@ class PlayState extends MusicBeatState { // FlxG.log.add(i); var babyArrow:FlxSprite = new FlxSprite(0, strumLine.y); + var colorswap:ColorSwap = new ColorSwap(); + babyArrow.shader = colorswap.shader; + colorswap.update(Note.arrowColors[i]); switch (curStage) { @@ -2007,8 +2012,11 @@ class PlayState extends MusicBeatState var controlArray:Array = [leftP, downP, upP, rightP]; // FlxG.watch.addQuick('asdfa', upP); - if ((upP || rightP || downP || leftP) && !boyfriend.stunned && generatedMusic) + if ((upP || rightP || downP || leftP) && generatedMusic) { + // note to self, used to have stunned + // && !boyfriend.stunned + boyfriend.holdTimer = 0; var possibleNotes:Array = [];