simple pause screen
This commit is contained in:
26
source/PauseSubState.hx
Normal file
26
source/PauseSubState.hx
Normal file
@@ -0,0 +1,26 @@
|
||||
package;
|
||||
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxSprite;
|
||||
import flixel.FlxSubState;
|
||||
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);
|
||||
|
||||
if (FlxG.keys.justPressed.ENTER)
|
||||
close();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user