Instant Respawn

This commit is contained in:
Lil-Parrot
2021-08-08 00:10:12 -05:00
parent c69e83d8e0
commit 24acbc5f74
5 changed files with 40 additions and 0 deletions

View File

@ -60,6 +60,16 @@ class GameOverState extends FlxTransitionableState
var gamepad:FlxGamepad = FlxG.gamepads.lastActive;
if(FlxG.save.data.InstantRespawn)
{
fading = true;
FlxG.sound.music.fadeOut(0.5, 0, function(twn:FlxTween)
{
FlxG.sound.music.stop();
LoadingState.loadAndSwitchState(new PlayState());
});
}
if (gamepad != null)
{
if (gamepad.justPressed.ANY)