mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-05-22 07:01:27 +00:00
Merge pull request #2390 from ImCodist/polish/game-over-transition
Polish for the transition from GameOverSubState back into PlayState.
This commit is contained in:
commit
5e70d9fcef
|
@ -826,6 +826,8 @@ class PlayState extends MusicBeatSubState
|
||||||
|
|
||||||
resetCamera();
|
resetCamera();
|
||||||
|
|
||||||
|
var fromDeathState = isPlayerDying;
|
||||||
|
|
||||||
persistentUpdate = true;
|
persistentUpdate = true;
|
||||||
persistentDraw = true;
|
persistentDraw = true;
|
||||||
|
|
||||||
|
@ -863,8 +865,11 @@ class PlayState extends MusicBeatSubState
|
||||||
|
|
||||||
if (currentStage != null) currentStage.resetStage();
|
if (currentStage != null) currentStage.resetStage();
|
||||||
|
|
||||||
playerStrumline.vwooshNotes();
|
if (!fromDeathState)
|
||||||
opponentStrumline.vwooshNotes();
|
{
|
||||||
|
playerStrumline.vwooshNotes();
|
||||||
|
opponentStrumline.vwooshNotes();
|
||||||
|
}
|
||||||
|
|
||||||
playerStrumline.clean();
|
playerStrumline.clean();
|
||||||
opponentStrumline.clean();
|
opponentStrumline.clean();
|
||||||
|
@ -1075,6 +1080,22 @@ class PlayState extends MusicBeatSubState
|
||||||
|
|
||||||
function moveToGameOver():Void
|
function moveToGameOver():Void
|
||||||
{
|
{
|
||||||
|
// Reset and update a bunch of values in advance for the transition back from the game over substate.
|
||||||
|
playerStrumline.clean();
|
||||||
|
opponentStrumline.clean();
|
||||||
|
|
||||||
|
songScore = 0;
|
||||||
|
updateScoreText();
|
||||||
|
|
||||||
|
health = Constants.HEALTH_STARTING;
|
||||||
|
healthLerp = health;
|
||||||
|
|
||||||
|
healthBar.value = healthLerp;
|
||||||
|
|
||||||
|
iconP1.updatePosition();
|
||||||
|
iconP2.updatePosition();
|
||||||
|
|
||||||
|
// Transition to the game over substate.
|
||||||
var gameOverSubState = new GameOverSubState(
|
var gameOverSubState = new GameOverSubState(
|
||||||
{
|
{
|
||||||
isChartingMode: isChartingMode,
|
isChartingMode: isChartingMode,
|
||||||
|
|
Loading…
Reference in a new issue