outdated check
This commit is contained in:
@ -1,18 +1,23 @@
|
||||
package;
|
||||
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxSprite;
|
||||
import flixel.FlxSubState;
|
||||
import flixel.text.FlxText;
|
||||
import flixel.util.FlxColor;
|
||||
import lime.app.Application;
|
||||
|
||||
class OutdatedSubState extends MusicBeatSubstate
|
||||
class OutdatedSubState extends MusicBeatState
|
||||
{
|
||||
public function new()
|
||||
public static var leftState:Bool = false;
|
||||
|
||||
override function create()
|
||||
{
|
||||
super();
|
||||
super.create();
|
||||
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
|
||||
add(bg);
|
||||
var ver = "v" + Application.current.meta.get('version');
|
||||
var txt:FlxText = new FlxText(0, 0, 0,
|
||||
var txt:FlxText = new FlxText(0, 0, FlxG.width,
|
||||
"HEY! You're running an outdated version of the game!\nCurrent version is "
|
||||
+ ver
|
||||
+ " while the current version is "
|
||||
@ -32,7 +37,8 @@ class OutdatedSubState extends MusicBeatSubstate
|
||||
}
|
||||
if (controls.BACK)
|
||||
{
|
||||
close();
|
||||
leftState = true;
|
||||
FlxG.switchState(new MainMenuState());
|
||||
}
|
||||
super.update(elapsed);
|
||||
}
|
||||
|
Reference in New Issue
Block a user