update now
This commit is contained in:
@ -1,45 +1,98 @@
|
||||
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 MusicBeatState
|
||||
{
|
||||
public static var leftState:Bool = false;
|
||||
|
||||
public static var needVer:String = "IDFK LOL";
|
||||
|
||||
override function create()
|
||||
{
|
||||
super.create();
|
||||
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
|
||||
add(bg);
|
||||
var txt:FlxText = new FlxText(0, 0, FlxG.width,
|
||||
"Kade Engine is Outdated!\n"
|
||||
+ MainMenuState.kadeEngineVer
|
||||
+ " is your current version\nwhile the most recent version is " + needVer
|
||||
+ "!\nPress Space to go to the github or ESCAPE to ignore this!!",
|
||||
32);
|
||||
txt.setFormat("VCR OSD Mono", 32, FlxColor.WHITE, CENTER);
|
||||
txt.screenCenter();
|
||||
add(txt);
|
||||
}
|
||||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
if (controls.ACCEPT)
|
||||
{
|
||||
FlxG.openURL("https://github.com/KadeDev/Kade-Engine/releases/latest");
|
||||
}
|
||||
if (controls.BACK)
|
||||
{
|
||||
leftState = true;
|
||||
FlxG.switchState(new MainMenuState());
|
||||
}
|
||||
super.update(elapsed);
|
||||
}
|
||||
}
|
||||
package;
|
||||
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxSprite;
|
||||
import flixel.FlxSubState;
|
||||
import flixel.text.FlxText;
|
||||
import flixel.tweens.FlxEase;
|
||||
import flixel.tweens.FlxTween;
|
||||
import flixel.util.FlxColor;
|
||||
import flixel.util.FlxTimer;
|
||||
import lime.app.Application;
|
||||
|
||||
class OutdatedSubState extends MusicBeatState
|
||||
{
|
||||
public static var leftState:Bool = false;
|
||||
|
||||
public static var needVer:String = "IDFK LOL";
|
||||
public static var currChanges:String = "dk";
|
||||
|
||||
private var bgColors:Array<String> = [
|
||||
'#314d7f',
|
||||
'#4e7093',
|
||||
'#70526e',
|
||||
'#594465'
|
||||
];
|
||||
private var colorRotation:Int = 1;
|
||||
|
||||
override function create()
|
||||
{
|
||||
super.create();
|
||||
var bg:FlxSprite = new FlxSprite().loadGraphic(Paths.image('week54prototype', 'shared'));
|
||||
bg.scale.x *= 1.55;
|
||||
bg.scale.y *= 1.55;
|
||||
bg.screenCenter();
|
||||
add(bg);
|
||||
|
||||
var kadeLogo:FlxSprite = new FlxSprite(FlxG.width, 0).loadGraphic(Paths.image('KadeEngineLogo'));
|
||||
kadeLogo.scale.y = 0.3;
|
||||
kadeLogo.scale.x = 0.3;
|
||||
kadeLogo.x -= kadeLogo.frameHeight;
|
||||
kadeLogo.y -= 180;
|
||||
kadeLogo.alpha = 0.8;
|
||||
add(kadeLogo);
|
||||
|
||||
var txt:FlxText = new FlxText(0, 0, FlxG.width,
|
||||
"Kade Engine is Outdated!\n"
|
||||
+ MainMenuState.kadeEngineVer
|
||||
+ " is your current version\nwhile the most recent version is " + needVer + "!"
|
||||
+ "\n\nWhat's new\n\n"
|
||||
+ currChanges
|
||||
+ "\n\n...Bug fixes and other changes included!"
|
||||
+ "\nPress Space to go to Github or ESCAPE to ignore this!!",
|
||||
32);
|
||||
|
||||
txt.setFormat("VCR OSD Mono", 32, FlxColor.fromRGB(200, 200, 200), CENTER);
|
||||
txt.borderColor = FlxColor.BLACK;
|
||||
txt.borderSize = 3;
|
||||
txt.borderStyle = FlxTextBorderStyle.OUTLINE;
|
||||
txt.screenCenter();
|
||||
add(txt);
|
||||
|
||||
FlxTween.color(bg, 2, bg.color, FlxColor.fromString(bgColors[colorRotation]));
|
||||
FlxTween.angle(kadeLogo, kadeLogo.angle, -10, 2, {ease: FlxEase.quartInOut});
|
||||
|
||||
new FlxTimer().start(2, function(tmr:FlxTimer)
|
||||
{
|
||||
FlxTween.color(bg, 2, bg.color, FlxColor.fromString(bgColors[colorRotation]));
|
||||
if(colorRotation < (bgColors.length - 1)) colorRotation++;
|
||||
else colorRotation = 0;
|
||||
}, 0);
|
||||
|
||||
new FlxTimer().start(2, function(tmr:FlxTimer)
|
||||
{
|
||||
if(kadeLogo.angle == -10) FlxTween.angle(kadeLogo, kadeLogo.angle, 10, 2, {ease: FlxEase.quartInOut});
|
||||
else FlxTween.angle(kadeLogo, kadeLogo.angle, -10, 2, {ease: FlxEase.quartInOut});
|
||||
}, 0);
|
||||
|
||||
new FlxTimer().start(0.8, function(tmr:FlxTimer)
|
||||
{
|
||||
if(kadeLogo.alpha == 0.8) FlxTween.tween(kadeLogo, {alpha: 1}, 0.8, {ease: FlxEase.quartInOut});
|
||||
else FlxTween.tween(kadeLogo, {alpha: 0.8}, 0.8, {ease: FlxEase.quartInOut});
|
||||
}, 0);
|
||||
}
|
||||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
if (controls.ACCEPT)
|
||||
{
|
||||
FlxG.openURL("https://kadedev.github.io/Kade-Engine/");
|
||||
}
|
||||
if (controls.BACK)
|
||||
{
|
||||
leftState = true;
|
||||
FlxG.switchState(new MainMenuState());
|
||||
}
|
||||
super.update(elapsed);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user