mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
Fix a bug where the background of the game over screen is pink
This commit is contained in:
parent
f16f2b8f84
commit
8fea7eb734
2 changed files with 17 additions and 4 deletions
|
@ -64,9 +64,13 @@ class GameOverSubState extends MusicBeatSubState
|
|||
*/
|
||||
var isEnding:Bool = false;
|
||||
|
||||
public function new()
|
||||
var transparent:Bool;
|
||||
|
||||
public function new(params:GameOverParams)
|
||||
{
|
||||
super();
|
||||
|
||||
transparent = params.transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -87,9 +91,10 @@ class GameOverSubState extends MusicBeatSubState
|
|||
//
|
||||
|
||||
// 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);
|
||||
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();
|
||||
add(bg);
|
||||
|
||||
|
@ -307,3 +312,8 @@ class GameOverSubState extends MusicBeatSubState
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
typedef GameOverParams =
|
||||
{
|
||||
var transparent:Bool;
|
||||
}
|
||||
|
|
|
@ -922,7 +922,10 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
#end
|
||||
|
||||
var gameOverSubState = new GameOverSubState();
|
||||
var gameOverSubState = new GameOverSubState(
|
||||
{
|
||||
transparent: persistentDraw,
|
||||
});
|
||||
FlxTransitionableSubState.skipNextTransIn = true;
|
||||
FlxTransitionableSubState.skipNextTransOut = true;
|
||||
openSubState(gameOverSubState);
|
||||
|
|
Loading…
Reference in a new issue