mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-08-20 07:25:59 +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:
commit
e6cee0079f
|
@ -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