2020-10-09 21:24:20 +00:00
|
|
|
package;
|
|
|
|
|
2020-10-22 00:22:12 +00:00
|
|
|
import Controls.Control;
|
2020-10-09 21:24:20 +00:00
|
|
|
import flixel.FlxG;
|
|
|
|
import flixel.FlxSprite;
|
|
|
|
import flixel.FlxSubState;
|
2020-10-22 00:22:12 +00:00
|
|
|
import flixel.input.keyboard.FlxKey;
|
2020-10-09 21:24:20 +00:00
|
|
|
import flixel.util.FlxColor;
|
|
|
|
|
|
|
|
class PauseSubState extends FlxSubState
|
|
|
|
{
|
|
|
|
public function new()
|
|
|
|
{
|
|
|
|
super();
|
|
|
|
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
|
|
|
|
bg.alpha = 0.6;
|
|
|
|
bg.scrollFactor.set();
|
|
|
|
add(bg);
|
|
|
|
}
|
|
|
|
|
|
|
|
override function update(elapsed:Float)
|
|
|
|
{
|
|
|
|
super.update(elapsed);
|
|
|
|
|
2020-10-22 00:22:12 +00:00
|
|
|
if (FlxG.keys.justPressed.J)
|
|
|
|
{
|
|
|
|
PlayerSettings.player1.controls.replaceBinding(Control.LEFT, Keys, FlxKey.J, null);
|
|
|
|
}
|
|
|
|
|
2020-10-09 21:24:20 +00:00
|
|
|
if (FlxG.keys.justPressed.ENTER)
|
|
|
|
close();
|
|
|
|
}
|
|
|
|
}
|