mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
Fix an error with playable Pico death
This commit is contained in:
parent
a0c4499b03
commit
26b7610663
2 changed files with 22 additions and 4 deletions
2
assets
2
assets
|
@ -1 +1 @@
|
||||||
Subproject commit 9e385784b1d2f4332de0d696b1df655cfa269da0
|
Subproject commit d6be0e084e4fda0416eca9ec7fe406af9b626e5c
|
|
@ -23,6 +23,12 @@ import funkin.play.character.BaseCharacter;
|
||||||
*/
|
*/
|
||||||
class GameOverSubState extends MusicBeatSubState
|
class GameOverSubState extends MusicBeatSubState
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The currently active GameOverSubState.
|
||||||
|
* There should be only one GameOverSubState in existance at a time, we can use a singleton.
|
||||||
|
*/
|
||||||
|
public static var instance:GameOverSubState = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Which alternate animation on the character to use.
|
* Which alternate animation on the character to use.
|
||||||
* You can set this via script.
|
* You can set this via script.
|
||||||
|
@ -88,6 +94,13 @@ class GameOverSubState extends MusicBeatSubState
|
||||||
|
|
||||||
override public function create()
|
override public function create()
|
||||||
{
|
{
|
||||||
|
if (instance != null)
|
||||||
|
{
|
||||||
|
// TODO: Do something in this case? IDK.
|
||||||
|
trace('WARNING: GameOverSubState instance already exists. This should not happen.');
|
||||||
|
}
|
||||||
|
instance = this;
|
||||||
|
|
||||||
super.create();
|
super.create();
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -283,10 +296,10 @@ class GameOverSubState extends MusicBeatSubState
|
||||||
*/
|
*/
|
||||||
function startDeathMusic(?startingVolume:Float = 1, force:Bool = false):Void
|
function startDeathMusic(?startingVolume:Float = 1, force:Bool = false):Void
|
||||||
{
|
{
|
||||||
var musicPath = Paths.music('gameOver' + musicSuffix);
|
var musicPath = Paths.music('gameplay/gameover/gameOver' + musicSuffix);
|
||||||
if (isEnding)
|
if (isEnding)
|
||||||
{
|
{
|
||||||
musicPath = Paths.music('gameOverEnd' + musicSuffix);
|
musicPath = Paths.music('gameplay/gameover/gameOverEnd' + musicSuffix);
|
||||||
}
|
}
|
||||||
if (!gameOverMusic.playing || force)
|
if (!gameOverMusic.playing || force)
|
||||||
{
|
{
|
||||||
|
@ -306,7 +319,7 @@ class GameOverSubState extends MusicBeatSubState
|
||||||
public static function playBlueBalledSFX()
|
public static function playBlueBalledSFX()
|
||||||
{
|
{
|
||||||
blueballed = true;
|
blueballed = true;
|
||||||
FlxG.sound.play(Paths.sound('fnf_loss_sfx' + blueBallSuffix));
|
FlxG.sound.play(Paths.sound('gameplay/gameover/fnf_loss_sfx' + blueBallSuffix));
|
||||||
}
|
}
|
||||||
|
|
||||||
var playingJeffQuote:Bool = false;
|
var playingJeffQuote:Bool = false;
|
||||||
|
@ -329,6 +342,11 @@ class GameOverSubState extends MusicBeatSubState
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override function toString():String
|
||||||
|
{
|
||||||
|
return "GameOverSubState";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef GameOverParams =
|
typedef GameOverParams =
|
||||||
|
|
Loading…
Reference in a new issue