diff --git a/source/OutdatedSubState.hx b/source/OutdatedSubState.hx deleted file mode 100644 index 899c2fd..0000000 --- a/source/OutdatedSubState.hx +++ /dev/null @@ -1,112 +0,0 @@ -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 = [ - '#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(); - bg.antialiasing = FlxG.save.data.antialiasing; - 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; - kadeLogo.antialiasing = FlxG.save.data.antialiasing; - add(kadeLogo); - - var txt:FlxText = new FlxText(0, 0, FlxG.width, - "Your Kade Engine is outdated!\nYou are on " - + MainMenuState.kadeEngineVer - + "\nwhile the most recent version is " + needVer + "." - + "\n\nWhat's new:\n\n" - + currChanges - + "\n& more changes and bugfixes in the full changelog" - + "\n\nPress Space to view the full changelog and update\nor ESCAPE to ignore this", - 32); - - if (MainMenuState.nightly != "") - txt.text = - "You are on\n" - + MainMenuState.kadeEngineVer - + "\nWhich is a PRE-RELEASE BUILD!" - + "\n\nReport all bugs to the author of the pre-release.\nSpace/Escape ignores this."; - - 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 && MainMenuState.nightly == "") - { - fancyOpenURL("https://kadedev.github.io/Kade-Engine/changelogs/changelog-" + needVer); - } - else if (controls.ACCEPT) - { - leftState = true; - FlxG.switchState(new MainMenuState()); - } - if (controls.BACK) - { - leftState = true; - FlxG.switchState(new MainMenuState()); - } - super.update(elapsed); - } -} diff --git a/source/TitleState.hx b/source/TitleState.hx index 3c63121..6a24c06 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -290,40 +290,6 @@ class TitleState extends MusicBeatState MainMenuState.firstStart = true; MainMenuState.finishedFunnyMove = false; - new FlxTimer().start(2, function(tmr:FlxTimer) - { - // Get current version of Kade Engine - - var http = new haxe.Http("https://raw.githubusercontent.com/KadeDev/Kade-Engine/master/version.downloadMe"); - var returnedData:Array = []; - - http.onData = function (data:String) - { - returnedData[0] = data.substring(0, data.indexOf(';')); - returnedData[1] = data.substring(data.indexOf('-'), data.length); - if (!MainMenuState.kadeEngineVer.contains(returnedData[0].trim()) && !OutdatedSubState.leftState) - { - trace('outdated lmao! ' + returnedData[0] + ' != ' + MainMenuState.kadeEngineVer); - OutdatedSubState.needVer = returnedData[0]; - OutdatedSubState.currChanges = returnedData[1]; - FlxG.switchState(new OutdatedSubState()); - clean(); - } - else - { - FlxG.switchState(new MainMenuState()); - clean(); - } - } - - http.onError = function (error) { - trace('error: $error'); - FlxG.switchState(new MainMenuState()); // fail but we go anyway - clean(); - } - - http.request(); - }); // FlxG.sound.play(Paths.music('titleShoot'), 0.7); } diff --git a/version.downloadMe b/version.downloadMe deleted file mode 100644 index 93bbd4b..0000000 --- a/version.downloadMe +++ /dev/null @@ -1,8 +0,0 @@ -1.6.2; -- Added the ability to select and modify notes in the editor -- Added copy and paste (with ctrl z support) while selecting notes -- Optimized gameplay -- Optimized the chart editor (less lag on longer songs, and faster load times) -- Fixed stutter at the start of a song -- Fixed scroll speed changes so they work when more then one of them exist -- Modcharts now work on Linux! \ No newline at end of file