mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-27 07:27:12 +00:00
36 lines
707 B
Haxe
36 lines
707 B
Haxe
package funkin.util.plugins;
|
|
|
|
import flixel.FlxBasic;
|
|
|
|
/**
|
|
* A plugin which adds functionality to press `F4` to immediately transition to the main menu.
|
|
* This is useful for debugging or if you get softlocked or something.
|
|
*/
|
|
class EvacuateDebugPlugin extends FlxBasic
|
|
{
|
|
public function new()
|
|
{
|
|
super();
|
|
}
|
|
|
|
public static function initialize():Void
|
|
{
|
|
FlxG.plugins.addPlugin(new EvacuateDebugPlugin());
|
|
}
|
|
|
|
public override function update(elapsed:Float):Void
|
|
{
|
|
super.update(elapsed);
|
|
|
|
if (FlxG.keys.justPressed.F4)
|
|
{
|
|
FlxG.switchState(() -> new funkin.ui.mainmenu.MainMenuState());
|
|
}
|
|
}
|
|
|
|
public override function destroy():Void
|
|
{
|
|
super.destroy();
|
|
}
|
|
}
|