update now

This commit is contained in:
Detoria 2021-05-13 08:15:33 -03:00 committed by GitHub
parent 5c7c5d20ef
commit 22886e72b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 819 additions and 763 deletions

View File

@ -155,9 +155,9 @@ class MainMenuState extends MusicBeatState
if (optionShit[curSelected] == 'donate')
{
#if linux
Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]);
Sys.command('/usr/bin/xdg-open', ["https://www.kickstarter.com/projects/funkin/friday-night-funkin-the-full-ass-game", "&"]);
#else
FlxG.openURL('https://ninja-muffin24.itch.io/funkin');
FlxG.openURL('https://www.kickstarter.com/projects/funkin/friday-night-funkin-the-full-ass-game');
#end
}
else

View File

@ -4,7 +4,10 @@ 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
@ -12,28 +15,78 @@ 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().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
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
+ "!\nPress Space to go to the github or ESCAPE to ignore this!!",
+ " 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.WHITE, CENTER);
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://github.com/KadeDev/Kade-Engine/releases/latest");
FlxG.openURL("https://kadedev.github.io/Kade-Engine/");
}
if (controls.BACK)
{

View File

@ -306,17 +306,21 @@ class TitleState extends MusicBeatState
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 http = new haxe.Http("https://raw.githubusercontent.com/KadeDev/Kade-Engine/master/version.downloadMe");
var http = new haxe.Http("https://raw.githubusercontent.com/theDetourist/Kade-Engine/patchnotes/version.downloadMe");
var returnedData:Array<String> = [];
http.onData = function (data:String) {
if (!MainMenuState.kadeEngineVer.contains(data.trim()) && !OutdatedSubState.leftState && MainMenuState.nightly == "")
http.onData = function (data:String)
{
trace('outdated lmao! ' + data.trim() + ' != ' + MainMenuState.kadeEngineVer);
OutdatedSubState.needVer = data;
returnedData[0] = data.substring(0, data.indexOf(';'));
returnedData[1] = data.substring(data.indexOf('-'), data.length);
if (!MainMenuState.kadeEngineVer.contains(returnedData[0].trim()) && !OutdatedSubState.leftState && MainMenuState.nightly == "")
{
trace('outdated lmao! ' + returnedData[0] + ' != ' + MainMenuState.kadeEngineVer);
OutdatedSubState.needVer = returnedData[0];
OutdatedSubState.currChanges = returnedData[1];
FlxG.switchState(new OutdatedSubState());
}
else
@ -331,7 +335,6 @@ class TitleState extends MusicBeatState
}
http.request();
});
// FlxG.sound.play(Paths.music('titleShoot'), 0.7);
}