From 702c9ad124321c267b279942577d591228494c2e Mon Sep 17 00:00:00 2001 From: Lunar <144155299+SyncGit12@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:27:04 -0300 Subject: [PATCH] js engine now works but the easter egg does not --- source/TitleState.hx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/TitleState.hx b/source/TitleState.hx index 10b35e1f1ed..0054f25b25a 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -53,6 +53,8 @@ class TitleState extends MusicBeatState public static var initialized:Bool = false; + public static var sarcasmEgg:String; + final sarcasmKeys:Array = [ 'ANNOUNCER' ]; @@ -226,8 +228,6 @@ class TitleState extends MusicBeatState logoBl.animation.play('bump'); logoBl.updateHitbox(); - sarcasmEasterEgg(); - swagShader = new ColorSwap(); gfDance = new FlxSprite(titleJSON.gfx, titleJSON.gfy); @@ -367,14 +367,16 @@ class TitleState extends MusicBeatState // Sarcasm Easter Egg, this might not work! :D function sarcasmEasterEgg() { - if(FlxG.save.data == null) FlxG.save.data = ''; // Crash prevention - switch(sarcasmEasterEgg.toUpperCase()) + //if(FlxG.save.data == null) FlxG.save.data = ''; // Crash prevention + switch(sarcasmEgg) { case 'ANNOUNCER': FlxG.sound.play(Paths.sound('sarcasmComplete')); } } + sarcasmEasterEgg(); + if (initialized && !transitioning && skippedIntro) { if (newTitle && !pressedEnter)