icons and changelog and newgrounds

This commit is contained in:
Cameron Taylor
2021-02-14 19:45:18 -05:00
parent 0bf80f78df
commit b460f2c1c9
8 changed files with 17 additions and 5 deletions

View File

@@ -14,6 +14,8 @@ import io.newgrounds.objects.events.Result.GetVersionResult;
import lime.app.Application;
import openfl.display.Stage;
using StringTools;
/**
* MADE BY GEOKURELI THE LEGENED GOD HERO MVP
*/
@@ -28,6 +30,7 @@ class NGio
public static var ngScoresLoaded(default, null):FlxSignal = new FlxSignal();
public static var GAME_VER:String = "";
public static var GAME_VER_NUMS:String = '';
public static var gotOnlineVer:Bool = false;
public static function noLogin(api:String)
@@ -43,7 +46,8 @@ class NGio
{
var call = NG.core.calls.app.getCurrentVersion(GAME_VER).addDataHandler(function(response:Response<GetCurrentVersionResult>)
{
GAME_VER = response.result.data.current_version;
GAME_VER = response.result.data.currentVersion;
GAME_VER_NUMS = GAME_VER.split(" ")[0].trim();
trace('CURRENT NG VERSION: ' + GAME_VER);
gotOnlineVer = true;
});

View File

@@ -88,7 +88,10 @@ class TitleState extends MusicBeatState
#elseif CHARTING
FlxG.switchState(new ChartingState());
#else
startIntro();
new FlxTimer().start(1, function(tmr:FlxTimer)
{
startIntro();
});
#end
}
@@ -223,7 +226,8 @@ class TitleState extends MusicBeatState
override function update(elapsed:Float)
{
Conductor.songPosition = FlxG.sound.music.time;
if (FlxG.sound.music != null)
Conductor.songPosition = FlxG.sound.music.time;
// FlxG.watch.addQuick('amp', FlxG.sound.music.amplitude);
if (FlxG.keys.justPressed.F)
@@ -270,7 +274,7 @@ class TitleState extends MusicBeatState
var version:String = "v" + Application.current.meta.get('version');
if (version.trim() != NGio.GAME_VER.trim() && !OutdatedSubState.leftState)
if (version.trim() != NGio.GAME_VER_NUMS && !OutdatedSubState.leftState)
{
trace('OLD VERSION!');
FlxG.switchState(new OutdatedSubState());