2022-07-23 02:25:19 +00:00
|
|
|
package funkin.play;
|
2020-10-27 10:35:23 +00:00
|
|
|
|
2023-05-31 07:03:10 +00:00
|
|
|
import flixel.FlxG;
|
2020-10-27 10:35:23 +00:00
|
|
|
import flixel.FlxObject;
|
2022-08-17 00:26:34 +00:00
|
|
|
import flixel.FlxSprite;
|
2023-07-02 19:34:07 +00:00
|
|
|
import flixel.sound.FlxSound;
|
2024-02-18 08:02:36 +00:00
|
|
|
import funkin.audio.FunkinSound;
|
2020-10-28 07:03:32 +00:00
|
|
|
import flixel.util.FlxColor;
|
|
|
|
import flixel.util.FlxTimer;
|
2024-01-16 21:49:15 +00:00
|
|
|
import funkin.graphics.FunkinSprite;
|
2022-04-19 00:39:41 +00:00
|
|
|
import funkin.modding.events.ScriptEvent;
|
|
|
|
import funkin.modding.events.ScriptEventDispatcher;
|
2024-02-15 22:25:28 +00:00
|
|
|
import funkin.play.character.BaseCharacter;
|
2022-03-08 08:13:53 +00:00
|
|
|
import funkin.play.PlayState;
|
2023-11-07 09:04:22 +00:00
|
|
|
import funkin.ui.freeplay.FreeplayState;
|
2024-02-15 22:25:28 +00:00
|
|
|
import funkin.ui.MusicBeatSubState;
|
|
|
|
import funkin.ui.story.StoryMenuState;
|
|
|
|
import openfl.utils.Assets;
|
2020-10-27 10:35:23 +00:00
|
|
|
|
2022-03-21 04:19:05 +00:00
|
|
|
/**
|
|
|
|
* A substate which renders over the PlayState when the player dies.
|
|
|
|
* Displays the player death animation, plays the music, and handles restarting the song.
|
2023-06-08 20:30:45 +00:00
|
|
|
*
|
2022-03-21 04:19:05 +00:00
|
|
|
* The newest implementation uses a substate, which prevents having to reload the song and stage each reset.
|
|
|
|
*/
|
2023-06-01 22:52:58 +00:00
|
|
|
class GameOverSubState extends MusicBeatSubState
|
2020-10-27 10:35:23 +00:00
|
|
|
{
|
2024-01-18 04:14:28 +00:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
|
2023-01-23 03:25:45 +00:00
|
|
|
/**
|
|
|
|
* Which alternate animation on the character to use.
|
|
|
|
* You can set this via script.
|
|
|
|
* For example, playing a different animation when BF dies in Week 4
|
|
|
|
* or Pico dies in Weekend 1.
|
|
|
|
*/
|
|
|
|
public static var animationSuffix:String = "";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Which alternate game over music to use.
|
|
|
|
* You can set this via script.
|
|
|
|
* For example, the bf-pixel script sets this to `-pixel`
|
|
|
|
* and the pico-playable script sets this to `Pico`.
|
|
|
|
*/
|
|
|
|
public static var musicSuffix:String = "";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Which alternate "blue ball" sound effect to use.
|
|
|
|
*/
|
|
|
|
public static var blueBallSuffix:String = "";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The boyfriend character.
|
|
|
|
*/
|
|
|
|
var boyfriend:BaseCharacter;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The invisible object in the scene which the camera focuses on.
|
|
|
|
*/
|
|
|
|
var cameraFollowPoint:FlxObject;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The music playing in the background of the state.
|
|
|
|
*/
|
2024-02-18 08:02:36 +00:00
|
|
|
var gameOverMusic:Null<FunkinSound> = null;
|
2023-01-23 03:25:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether the player has confirmed and prepared to restart the level.
|
|
|
|
* This means the animation and transition have already started.
|
|
|
|
*/
|
|
|
|
var isEnding:Bool = false;
|
|
|
|
|
2024-02-18 08:02:36 +00:00
|
|
|
/**
|
|
|
|
* Whether the death music is on its first loop.
|
|
|
|
*/
|
|
|
|
var isStarting:Bool = true;
|
|
|
|
|
2023-12-19 06:27:58 +00:00
|
|
|
var isChartingMode:Bool = false;
|
|
|
|
|
2023-12-19 06:57:39 +00:00
|
|
|
var transparent:Bool;
|
|
|
|
|
|
|
|
public function new(params:GameOverParams)
|
2023-01-23 03:25:45 +00:00
|
|
|
{
|
|
|
|
super();
|
2023-12-19 06:27:58 +00:00
|
|
|
|
|
|
|
this.isChartingMode = params?.isChartingMode ?? false;
|
2023-12-19 06:57:39 +00:00
|
|
|
transparent = params.transparent;
|
2023-01-23 03:25:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reset the game over configuration to the default.
|
|
|
|
*/
|
|
|
|
public static function reset()
|
|
|
|
{
|
|
|
|
animationSuffix = "";
|
|
|
|
musicSuffix = "";
|
2024-02-13 05:29:46 +00:00
|
|
|
blueBallSuffix = "";
|
2023-01-23 03:25:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
override public function create()
|
|
|
|
{
|
2024-01-18 04:14:28 +00:00
|
|
|
if (instance != null)
|
|
|
|
{
|
|
|
|
// TODO: Do something in this case? IDK.
|
|
|
|
trace('WARNING: GameOverSubState instance already exists. This should not happen.');
|
|
|
|
}
|
|
|
|
instance = this;
|
|
|
|
|
2023-01-23 03:25:45 +00:00
|
|
|
super.create();
|
|
|
|
|
|
|
|
//
|
|
|
|
// Set up the visuals
|
|
|
|
//
|
|
|
|
|
|
|
|
// Add a black background to the screen.
|
2024-01-16 21:49:15 +00:00
|
|
|
var bg = new FunkinSprite().makeSolidColor(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK);
|
2023-12-19 06:57:39 +00:00
|
|
|
// 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;
|
2023-01-23 03:25:45 +00:00
|
|
|
bg.scrollFactor.set();
|
2024-01-16 05:03:30 +00:00
|
|
|
bg.screenCenter();
|
2023-01-23 03:25:45 +00:00
|
|
|
add(bg);
|
|
|
|
|
2023-06-01 22:52:58 +00:00
|
|
|
// Pluck Boyfriend from the PlayState and place him (in the same position) in the GameOverSubState.
|
2023-01-23 03:25:45 +00:00
|
|
|
// We can then play the character's `firstDeath` animation.
|
|
|
|
boyfriend = PlayState.instance.currentStage.getBoyfriend(true);
|
|
|
|
boyfriend.isDead = true;
|
|
|
|
add(boyfriend);
|
|
|
|
boyfriend.resetCharacter();
|
2023-05-31 07:03:10 +00:00
|
|
|
|
2023-01-23 03:25:45 +00:00
|
|
|
// Assign a camera follow point to the boyfriend's position.
|
|
|
|
cameraFollowPoint = new FlxObject(PlayState.instance.cameraFollowPoint.x, PlayState.instance.cameraFollowPoint.y, 1, 1);
|
|
|
|
cameraFollowPoint.x = boyfriend.getGraphicMidpoint().x;
|
|
|
|
cameraFollowPoint.y = boyfriend.getGraphicMidpoint().y;
|
2023-10-11 05:04:56 +00:00
|
|
|
var offsets:Array<Float> = boyfriend.getDeathCameraOffsets();
|
|
|
|
cameraFollowPoint.x += offsets[0];
|
|
|
|
cameraFollowPoint.y += offsets[1];
|
2023-01-23 03:25:45 +00:00
|
|
|
add(cameraFollowPoint);
|
|
|
|
|
|
|
|
FlxG.camera.target = null;
|
|
|
|
FlxG.camera.follow(cameraFollowPoint, LOCKON, 0.01);
|
|
|
|
|
|
|
|
//
|
|
|
|
// Set up the audio
|
|
|
|
//
|
|
|
|
|
|
|
|
// The conductor now represents the BPM of the game over music.
|
2023-12-14 21:56:20 +00:00
|
|
|
Conductor.instance.update(0);
|
2023-01-23 03:25:45 +00:00
|
|
|
}
|
|
|
|
|
2024-02-15 22:25:28 +00:00
|
|
|
public function resetCameraZoom():Void
|
|
|
|
{
|
|
|
|
// Apply camera zoom level from stage data.
|
|
|
|
FlxG.camera.zoom = PlayState?.instance?.currentStage?.camZoom ?? 1.0;
|
|
|
|
}
|
|
|
|
|
2023-06-01 04:31:32 +00:00
|
|
|
var hasStartedAnimation:Bool = false;
|
|
|
|
|
2023-01-23 03:25:45 +00:00
|
|
|
override function update(elapsed:Float)
|
|
|
|
{
|
2023-06-01 04:31:32 +00:00
|
|
|
if (!hasStartedAnimation)
|
|
|
|
{
|
|
|
|
hasStartedAnimation = true;
|
|
|
|
|
2023-06-15 07:48:52 +00:00
|
|
|
if (boyfriend.hasAnimation('fakeoutDeath') && FlxG.random.bool((1 / 4096) * 100))
|
2023-06-01 04:31:32 +00:00
|
|
|
{
|
2023-08-03 15:22:52 +00:00
|
|
|
boyfriend.playAnimation('fakeoutDeath', true, false);
|
2023-06-01 04:31:32 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2023-08-03 15:22:52 +00:00
|
|
|
boyfriend.playAnimation('firstDeath', true, false); // ignoreOther is set to FALSE since you WANT to be able to mash and confirm game over!
|
2023-06-01 04:31:32 +00:00
|
|
|
// Play the "blue balled" sound. May play a variant if one has been assigned.
|
|
|
|
playBlueBalledSFX();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-23 03:25:45 +00:00
|
|
|
//
|
|
|
|
// Handle user inputs.
|
|
|
|
//
|
|
|
|
|
|
|
|
// MOBILE ONLY: Restart the level when tapping Boyfriend.
|
|
|
|
if (FlxG.onMobile)
|
|
|
|
{
|
|
|
|
var touch = FlxG.touches.getFirst();
|
|
|
|
if (touch != null)
|
|
|
|
{
|
|
|
|
if (touch.overlaps(boyfriend))
|
|
|
|
{
|
|
|
|
confirmDeath();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// KEYBOARD ONLY: Restart the level when pressing the assigned key.
|
2023-06-02 19:56:40 +00:00
|
|
|
if (controls.ACCEPT && blueballed)
|
2023-01-23 03:25:45 +00:00
|
|
|
{
|
2023-06-04 05:19:08 +00:00
|
|
|
blueballed = false;
|
2023-01-23 03:25:45 +00:00
|
|
|
confirmDeath();
|
|
|
|
}
|
|
|
|
|
|
|
|
// KEYBOARD ONLY: Return to the menu when pressing the assigned key.
|
|
|
|
if (controls.BACK)
|
|
|
|
{
|
2023-06-04 05:19:08 +00:00
|
|
|
blueballed = false;
|
2023-06-15 18:31:49 +00:00
|
|
|
PlayState.instance.deathCounter = 0;
|
|
|
|
// PlayState.seenCutscene = false; // old thing...
|
2023-01-23 03:25:45 +00:00
|
|
|
gameOverMusic.stop();
|
|
|
|
|
2023-12-19 06:27:58 +00:00
|
|
|
if (isChartingMode)
|
|
|
|
{
|
|
|
|
this.close();
|
|
|
|
if (FlxG.sound.music != null) FlxG.sound.music.pause(); // Don't reset song position!
|
|
|
|
PlayState.instance.close(); // This only works because PlayState is a substate!
|
|
|
|
}
|
|
|
|
else if (PlayStatePlaylist.isStoryMode)
|
|
|
|
{
|
2024-02-06 00:46:11 +00:00
|
|
|
FlxG.switchState(() -> new StoryMenuState());
|
2023-12-19 06:27:58 +00:00
|
|
|
}
|
2023-01-23 03:25:45 +00:00
|
|
|
else
|
2023-12-19 06:27:58 +00:00
|
|
|
{
|
2024-02-06 00:46:11 +00:00
|
|
|
FlxG.switchState(() -> new FreeplayState());
|
2023-12-19 06:27:58 +00:00
|
|
|
}
|
2023-01-23 03:25:45 +00:00
|
|
|
}
|
|
|
|
|
2024-02-18 08:02:36 +00:00
|
|
|
if (gameOverMusic != null && gameOverMusic.playing)
|
2023-01-23 03:25:45 +00:00
|
|
|
{
|
|
|
|
// Match the conductor to the music.
|
|
|
|
// This enables the stepHit and beatHit events.
|
2023-12-14 21:56:20 +00:00
|
|
|
Conductor.instance.update(gameOverMusic.time);
|
2023-01-23 03:25:45 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Music hasn't started yet.
|
2023-06-06 21:38:31 +00:00
|
|
|
switch (PlayStatePlaylist.campaignId)
|
2023-01-23 03:25:45 +00:00
|
|
|
{
|
|
|
|
// TODO: Make the behavior for playing Jeff's voicelines generic or un-hardcoded.
|
|
|
|
// This will simplify the class and make it easier for mods to add death quotes.
|
2023-06-06 21:38:31 +00:00
|
|
|
case "week7":
|
2023-01-23 03:25:45 +00:00
|
|
|
if (boyfriend.getCurrentAnimation().startsWith('firstDeath') && boyfriend.isAnimationFinished() && !playingJeffQuote)
|
|
|
|
{
|
|
|
|
playingJeffQuote = true;
|
|
|
|
playJeffQuote();
|
|
|
|
// Start music at lower volume
|
|
|
|
startDeathMusic(0.2, false);
|
2024-01-16 04:51:37 +00:00
|
|
|
boyfriend.playAnimation('deathLoop' + animationSuffix);
|
2023-01-23 03:25:45 +00:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
// Start music at normal volume once the initial death animation finishes.
|
|
|
|
if (boyfriend.getCurrentAnimation().startsWith('firstDeath') && boyfriend.isAnimationFinished())
|
|
|
|
{
|
|
|
|
startDeathMusic(1.0, false);
|
2023-08-02 22:08:49 +00:00
|
|
|
boyfriend.playAnimation('deathLoop' + animationSuffix);
|
2023-01-23 03:25:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-02 22:08:49 +00:00
|
|
|
// Start death music before firstDeath gets replaced
|
|
|
|
super.update(elapsed);
|
2023-01-23 03:25:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Do behavior which occurs when you confirm and move to restart the level.
|
|
|
|
*/
|
|
|
|
function confirmDeath():Void
|
|
|
|
{
|
|
|
|
if (!isEnding)
|
|
|
|
{
|
|
|
|
isEnding = true;
|
|
|
|
startDeathMusic(1.0, true); // isEnding changes this function's behavior.
|
|
|
|
|
|
|
|
boyfriend.playAnimation('deathConfirm' + animationSuffix, true);
|
|
|
|
|
|
|
|
// After the animation finishes...
|
2023-05-17 20:42:58 +00:00
|
|
|
new FlxTimer().start(0.7, function(tmr:FlxTimer) {
|
2023-01-23 03:25:45 +00:00
|
|
|
// ...fade out the graphics. Then after that happens...
|
2023-05-17 20:42:58 +00:00
|
|
|
FlxG.camera.fade(FlxColor.BLACK, 2, false, function() {
|
2023-06-01 22:52:58 +00:00
|
|
|
// ...close the GameOverSubState.
|
2023-01-23 03:25:45 +00:00
|
|
|
FlxG.camera.fade(FlxColor.BLACK, 1, true, null, true);
|
2023-06-06 21:38:31 +00:00
|
|
|
PlayState.instance.needsReset = true;
|
2023-01-23 03:25:45 +00:00
|
|
|
|
|
|
|
// Readd Boyfriend to the stage.
|
|
|
|
boyfriend.isDead = false;
|
|
|
|
remove(boyfriend);
|
|
|
|
PlayState.instance.currentStage.addCharacter(boyfriend, BF);
|
|
|
|
|
|
|
|
// Close the substate.
|
|
|
|
close();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-16 21:37:56 +00:00
|
|
|
public override function dispatchEvent(event:ScriptEvent)
|
2023-01-23 03:25:45 +00:00
|
|
|
{
|
|
|
|
super.dispatchEvent(event);
|
|
|
|
|
|
|
|
ScriptEventDispatcher.callEvent(boyfriend, event);
|
|
|
|
}
|
|
|
|
|
2024-02-18 08:02:36 +00:00
|
|
|
/**
|
|
|
|
* Rather than hardcoding stuff, we look for the presence of a music file
|
|
|
|
* with the given suffix, and strip it down until we find one that's valid.
|
|
|
|
*/
|
|
|
|
function resolveMusicPath(suffix:String, starting:Bool = false, ending:Bool = false):Null<String>
|
|
|
|
{
|
|
|
|
var basePath = 'gameplay/gameover/gameOver';
|
|
|
|
if (starting) basePath += 'Start';
|
|
|
|
else if (ending) basePath += 'End';
|
|
|
|
|
|
|
|
var musicPath = Paths.music(basePath + suffix);
|
|
|
|
while (!Assets.exists(musicPath) && suffix.length > 0)
|
|
|
|
{
|
|
|
|
suffix = suffix.split('-').slice(0, -1).join('-');
|
|
|
|
musicPath = Paths.music(basePath + suffix);
|
|
|
|
}
|
|
|
|
if (!Assets.exists(musicPath)) return null;
|
|
|
|
trace('Resolved music path: ' + musicPath);
|
|
|
|
return musicPath;
|
|
|
|
}
|
|
|
|
|
2023-01-23 03:25:45 +00:00
|
|
|
/**
|
|
|
|
* Starts the death music at the appropriate volume.
|
2023-06-08 20:30:45 +00:00
|
|
|
* @param startingVolume
|
2023-01-23 03:25:45 +00:00
|
|
|
*/
|
2024-02-18 08:02:36 +00:00
|
|
|
public function startDeathMusic(startingVolume:Float = 1, force:Bool = false):Void
|
2023-01-23 03:25:45 +00:00
|
|
|
{
|
2024-02-18 08:02:36 +00:00
|
|
|
var musicPath = resolveMusicPath(musicSuffix, isStarting, isEnding);
|
|
|
|
var onComplete = null;
|
|
|
|
if (isStarting)
|
|
|
|
{
|
|
|
|
if (musicPath == null)
|
|
|
|
{
|
|
|
|
isStarting = false;
|
|
|
|
musicPath = resolveMusicPath(musicSuffix, isStarting, isEnding);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
isStarting = false;
|
|
|
|
onComplete = function() {
|
|
|
|
// We need to force to ensure that the non-starting music plays.
|
|
|
|
startDeathMusic(1.0, true);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (musicPath == null)
|
2023-01-23 03:25:45 +00:00
|
|
|
{
|
2024-02-18 08:02:36 +00:00
|
|
|
trace('Could not find game over music!');
|
|
|
|
return;
|
2023-01-23 03:25:45 +00:00
|
|
|
}
|
2024-02-18 08:02:36 +00:00
|
|
|
else if (gameOverMusic == null || !gameOverMusic.playing || force)
|
2023-01-23 03:25:45 +00:00
|
|
|
{
|
2024-02-18 08:02:36 +00:00
|
|
|
if (gameOverMusic != null) gameOverMusic.stop();
|
|
|
|
gameOverMusic = FunkinSound.load(musicPath);
|
2023-01-23 03:25:45 +00:00
|
|
|
gameOverMusic.volume = startingVolume;
|
2024-02-18 08:02:36 +00:00
|
|
|
gameOverMusic.looped = !(isEnding || isStarting);
|
|
|
|
gameOverMusic.onComplete = onComplete;
|
2023-01-23 03:25:45 +00:00
|
|
|
gameOverMusic.play();
|
|
|
|
}
|
2024-02-18 08:02:36 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
@:privateAccess
|
|
|
|
trace('Music already playing! ${gameOverMusic?._label}');
|
|
|
|
}
|
2023-01-23 03:25:45 +00:00
|
|
|
}
|
|
|
|
|
2023-06-04 05:19:08 +00:00
|
|
|
static var blueballed:Bool = false;
|
2023-06-02 19:56:40 +00:00
|
|
|
|
2023-01-23 03:25:45 +00:00
|
|
|
/**
|
|
|
|
* Play the sound effect that occurs when
|
|
|
|
* boyfriend's testicles get utterly annihilated.
|
|
|
|
*/
|
2023-06-01 04:31:32 +00:00
|
|
|
public static function playBlueBalledSFX()
|
2023-01-23 03:25:45 +00:00
|
|
|
{
|
2023-06-02 19:56:40 +00:00
|
|
|
blueballed = true;
|
2024-02-15 22:25:28 +00:00
|
|
|
if (Assets.exists(Paths.sound('gameplay/gameover/fnf_loss_sfx' + blueBallSuffix)))
|
|
|
|
{
|
|
|
|
FlxG.sound.play(Paths.sound('gameplay/gameover/fnf_loss_sfx' + blueBallSuffix));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
FlxG.log.error('Missing blue ball sound effect: ' + Paths.sound('gameplay/gameover/fnf_loss_sfx' + blueBallSuffix));
|
|
|
|
}
|
2023-01-23 03:25:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var playingJeffQuote:Bool = false;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Week 7-specific hardcoded behavior, to play a custom death quote.
|
|
|
|
* TODO: Make this a module somehow.
|
|
|
|
*/
|
|
|
|
function playJeffQuote()
|
|
|
|
{
|
|
|
|
var randomCensor:Array<Int> = [];
|
|
|
|
|
2023-10-17 04:38:28 +00:00
|
|
|
if (!Preferences.naughtyness) randomCensor = [1, 3, 8, 13, 17, 21];
|
2023-01-23 03:25:45 +00:00
|
|
|
|
2023-05-17 20:42:58 +00:00
|
|
|
FlxG.sound.play(Paths.sound('jeffGameover/jeffGameover-' + FlxG.random.int(1, 25, randomCensor)), 1, false, null, true, function() {
|
2023-01-23 03:25:45 +00:00
|
|
|
// Once the quote ends, fade in the game over music.
|
|
|
|
if (!isEnding && gameOverMusic != null)
|
|
|
|
{
|
|
|
|
gameOverMusic.fadeIn(4, 0.2, 1);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2024-01-18 04:14:28 +00:00
|
|
|
|
2024-02-18 08:02:36 +00:00
|
|
|
public override function destroy()
|
|
|
|
{
|
|
|
|
super.destroy();
|
|
|
|
if (gameOverMusic != null) gameOverMusic.stop();
|
|
|
|
gameOverMusic = null;
|
|
|
|
instance = null;
|
|
|
|
}
|
|
|
|
|
2024-01-18 04:14:28 +00:00
|
|
|
public override function toString():String
|
|
|
|
{
|
|
|
|
return "GameOverSubState";
|
|
|
|
}
|
2020-10-27 10:35:23 +00:00
|
|
|
}
|
2023-12-19 06:27:58 +00:00
|
|
|
|
|
|
|
typedef GameOverParams =
|
|
|
|
{
|
|
|
|
var isChartingMode:Bool;
|
2023-12-19 06:57:39 +00:00
|
|
|
var transparent:Bool;
|
2023-12-19 06:27:58 +00:00
|
|
|
}
|