mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-15 00:58:48 +00:00
removed unused gameoverstate
This commit is contained in:
parent
65bbee0e36
commit
f060e6689c
|
@ -1,81 +0,0 @@
|
||||||
package;
|
|
||||||
|
|
||||||
import flixel.FlxSprite;
|
|
||||||
import flixel.addons.transition.FlxTransitionableState;
|
|
||||||
import flixel.graphics.frames.FlxAtlasFrames;
|
|
||||||
import flixel.input.gamepad.FlxGamepad;
|
|
||||||
import flixel.tweens.FlxEase;
|
|
||||||
import flixel.tweens.FlxTween;
|
|
||||||
|
|
||||||
class GameOverState extends FlxTransitionableState
|
|
||||||
{
|
|
||||||
var bfX:Float = 0;
|
|
||||||
var bfY:Float = 0;
|
|
||||||
|
|
||||||
public function new(x:Float, y:Float)
|
|
||||||
{
|
|
||||||
super();
|
|
||||||
|
|
||||||
bfX = x;
|
|
||||||
bfY = y;
|
|
||||||
}
|
|
||||||
|
|
||||||
override function create()
|
|
||||||
{
|
|
||||||
/* var loser:FlxSprite = new FlxSprite(100, 100);
|
|
||||||
var loseTex = FlxAtlasFrames.fromSparrow(AssetPaths.lose.png, AssetPaths.lose.xml);
|
|
||||||
loser.frames = loseTex;
|
|
||||||
loser.animation.addByPrefix('lose', 'lose', 24, false);
|
|
||||||
loser.animation.play('lose');
|
|
||||||
// add(loser); */
|
|
||||||
|
|
||||||
var bf:Boyfriend = new Boyfriend(bfX, bfY);
|
|
||||||
// bf.scrollFactor.set();
|
|
||||||
add(bf);
|
|
||||||
bf.playAnim('firstDeath');
|
|
||||||
|
|
||||||
FlxG.camera.follow(bf, LOCKON, 0.001);
|
|
||||||
/*
|
|
||||||
var restart:FlxSprite = new FlxSprite(500, 50).loadGraphic(AssetPaths.restart.png);
|
|
||||||
restart.setGraphicSize(Std.int(restart.width * 0.6));
|
|
||||||
restart.updateHitbox();
|
|
||||||
restart.alpha = 0;
|
|
||||||
restart.antialiasing = true;
|
|
||||||
// add(restart); */
|
|
||||||
|
|
||||||
FlxG.sound.music.fadeOut(2, FlxG.sound.music.volume * 0.6);
|
|
||||||
|
|
||||||
// FlxTween.tween(restart, {alpha: 1}, 1, {ease: FlxEase.quartInOut});
|
|
||||||
// FlxTween.tween(restart, {y: restart.y + 40}, 7, {ease: FlxEase.quartInOut, type: PINGPONG});
|
|
||||||
|
|
||||||
super.create();
|
|
||||||
}
|
|
||||||
|
|
||||||
private var fading:Bool = false;
|
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
|
||||||
{
|
|
||||||
var pressed:Bool = FlxG.keys.justPressed.ANY;
|
|
||||||
|
|
||||||
var gamepad:FlxGamepad = FlxG.gamepads.lastActive;
|
|
||||||
|
|
||||||
if (gamepad != null)
|
|
||||||
{
|
|
||||||
if (gamepad.justPressed.ANY)
|
|
||||||
pressed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
pressed = false;
|
|
||||||
|
|
||||||
if (pressed && !fading)
|
|
||||||
{
|
|
||||||
fading = true;
|
|
||||||
FlxG.sound.music.fadeOut(0.5, 0, function(twn:FlxTween)
|
|
||||||
{
|
|
||||||
FlxG.sound.music.stop();
|
|
||||||
LoadingState.loadAndSwitchState(new PlayState());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
super.update(elapsed);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -2067,8 +2067,6 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
||||||
|
|
||||||
// FlxG.switchState(new GameOverState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
|
||||||
|
|
||||||
#if discord_rpc
|
#if discord_rpc
|
||||||
// Game Over doesn't get his own variable because it's only used here
|
// Game Over doesn't get his own variable because it's only used here
|
||||||
DiscordClient.changePresence("Game Over - " + detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
|
DiscordClient.changePresence("Game Over - " + detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
|
||||||
|
|
Loading…
Reference in a new issue