mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-05 06:14:36 +00:00
Merge pull request #294 from FunkinCrew/bugfix/pico-death-anim-fix
Two bug fixes
This commit is contained in:
commit
7dacf6876a
2
assets
2
assets
|
@ -1 +1 @@
|
|||
Subproject commit 3d0c0aca06f0032aeca88a750b0ed9422e4afb07
|
||||
Subproject commit 5d28d36311d95d17ec9bddaca479b0f8db088a7c
|
|
@ -23,6 +23,12 @@ import funkin.play.character.BaseCharacter;
|
|||
*/
|
||||
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.
|
||||
* You can set this via script.
|
||||
|
@ -88,6 +94,13 @@ class GameOverSubState extends MusicBeatSubState
|
|||
|
||||
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();
|
||||
|
||||
//
|
||||
|
@ -283,10 +296,10 @@ class GameOverSubState extends MusicBeatSubState
|
|||
*/
|
||||
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)
|
||||
{
|
||||
musicPath = Paths.music('gameOverEnd' + musicSuffix);
|
||||
musicPath = Paths.music('gameplay/gameover/gameOverEnd' + musicSuffix);
|
||||
}
|
||||
if (!gameOverMusic.playing || force)
|
||||
{
|
||||
|
@ -306,7 +319,7 @@ class GameOverSubState extends MusicBeatSubState
|
|||
public static function playBlueBalledSFX()
|
||||
{
|
||||
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;
|
||||
|
@ -329,6 +342,11 @@ class GameOverSubState extends MusicBeatSubState
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
public override function toString():String
|
||||
{
|
||||
return "GameOverSubState";
|
||||
}
|
||||
}
|
||||
|
||||
typedef GameOverParams =
|
||||
|
|
|
@ -1354,6 +1354,7 @@ class PlayState extends MusicBeatSubState
|
|||
function loadStage(id:String):Void
|
||||
{
|
||||
currentStage = StageRegistry.instance.fetchEntry(id);
|
||||
currentStage.revive(); // Stages are killed and props destroyed when the PlayState is destroyed to save memory.
|
||||
|
||||
if (currentStage != null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue