2020-10-09 17:24:20 -04:00
|
|
|
package;
|
|
|
|
|
2020-10-21 20:22:12 -04:00
|
|
|
import Controls.Control;
|
2020-10-09 17:24:20 -04:00
|
|
|
import flixel.FlxG;
|
|
|
|
import flixel.FlxSprite;
|
|
|
|
import flixel.FlxSubState;
|
2020-10-21 20:22:12 -04:00
|
|
|
import flixel.input.keyboard.FlxKey;
|
2020-10-09 17:24:20 -04:00
|
|
|
import flixel.util.FlxColor;
|
|
|
|
|
|
|
|
class PauseSubState extends FlxSubState
|
|
|
|
{
|
2020-10-30 19:47:19 -04:00
|
|
|
public function new(x:Float, y:Float)
|
2020-10-09 17:24:20 -04:00
|
|
|
{
|
|
|
|
super();
|
|
|
|
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
|
|
|
|
bg.alpha = 0.6;
|
|
|
|
bg.scrollFactor.set();
|
|
|
|
add(bg);
|
2020-10-26 05:16:05 -04:00
|
|
|
|
2020-10-30 19:47:19 -04:00
|
|
|
var bf:Boyfriend = new Boyfriend(x, y);
|
|
|
|
bf.scrollFactor.set();
|
|
|
|
// add(bf);
|
|
|
|
|
|
|
|
bf.playAnim('firstDeath');
|
|
|
|
|
2020-10-26 05:16:05 -04:00
|
|
|
bg.cameras = [FlxG.cameras.list[1]];
|
2020-10-09 17:24:20 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
override function update(elapsed:Float)
|
|
|
|
{
|
|
|
|
super.update(elapsed);
|
|
|
|
|
2020-10-21 20:22:12 -04:00
|
|
|
if (FlxG.keys.justPressed.J)
|
|
|
|
{
|
|
|
|
PlayerSettings.player1.controls.replaceBinding(Control.LEFT, Keys, FlxKey.J, null);
|
|
|
|
}
|
|
|
|
|
2020-10-09 17:24:20 -04:00
|
|
|
if (FlxG.keys.justPressed.ENTER)
|
|
|
|
close();
|
|
|
|
}
|
|
|
|
}
|