outdated check

This commit is contained in:
Cameron Taylor
2020-12-25 00:17:21 -05:00
parent 087d735aa3
commit e1df3e98f6
3 changed files with 22 additions and 12 deletions

View File

@ -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);
}