1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-05-23 23:52:51 +00:00

Merge pull request #260 from FunkinCrew/bugfix/pink-game-over-screen

Fix a bug where the background of the game over screen is pink
This commit is contained in:
Cameron Taylor 2023-12-22 22:52:49 -05:00 committed by GitHub
commit e6cee0079f
2 changed files with 17 additions and 4 deletions

View file

@ -64,9 +64,13 @@ class GameOverSubState extends MusicBeatSubState
*/ */
var isEnding:Bool = false; var isEnding:Bool = false;
public function new() var transparent:Bool;
public function new(params:GameOverParams)
{ {
super(); super();
transparent = params.transparent;
} }
/** /**
@ -87,9 +91,10 @@ class GameOverSubState extends MusicBeatSubState
// //
// Add a black background to the screen. // Add a black background to the screen.
// We make this transparent so that we can see the stage underneath during debugging.
var bg = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK); var bg = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
bg.alpha = 0.25; // We make this transparent so that we can see the stage underneath during debugging,
// but it's normally opaque.
bg.alpha = transparent ? 0.25 : 1.0;
bg.scrollFactor.set(); bg.scrollFactor.set();
add(bg); add(bg);
@ -307,3 +312,8 @@ class GameOverSubState extends MusicBeatSubState
}); });
} }
} }
typedef GameOverParams =
{
var transparent:Bool;
}

View file

@ -922,7 +922,10 @@ class PlayState extends MusicBeatSubState
} }
#end #end
var gameOverSubState = new GameOverSubState(); var gameOverSubState = new GameOverSubState(
{
transparent: persistentDraw,
});
FlxTransitionableSubState.skipNextTransIn = true; FlxTransitionableSubState.skipNextTransIn = true;
FlxTransitionableSubState.skipNextTransOut = true; FlxTransitionableSubState.skipNextTransOut = true;
openSubState(gameOverSubState); openSubState(gameOverSubState);