From 7fb464d81ba2e5687f6522a3ca0fd21c7758ada0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=8D=9A=7ENex?= <87421482+NexIsDumb@users.noreply.github.com> Date: Sun, 1 Sep 2024 02:13:00 +0200 Subject: [PATCH] fuck you --- source/funkin/game/GameOverSubstate.hx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/funkin/game/GameOverSubstate.hx b/source/funkin/game/GameOverSubstate.hx index d17b3332..c2804338 100644 --- a/source/funkin/game/GameOverSubstate.hx +++ b/source/funkin/game/GameOverSubstate.hx @@ -28,6 +28,7 @@ class GameOverSubstate extends MusicBeatSubstate public var gameoverScript:Script; public var game:PlayState = PlayState.instance; // shortcut + public static var instance:GameOverSubstate = null; private var __cancelDefault:Bool = false; @@ -56,7 +57,7 @@ class GameOverSubstate extends MusicBeatSubstate FlxG.sound.music.stop(); gameoverScript = Script.create(Paths.script(script)); - gameoverScript.setParent(this); + gameoverScript.setParent(instance = this); gameoverScript.load(); var event = EventManager.get(GameOverCreationEvent).recycle(x, y, characterName, player, gameOverSong, gameOverSongBPM, lossSFXName, retrySFX); @@ -198,5 +199,6 @@ class GameOverSubstate extends MusicBeatSubstate gameoverScript.destroy(); super.destroy(); + instance = null; } } \ No newline at end of file