Skip to content

Commit

Permalink
removed version checker
Browse files Browse the repository at this point in the history
  • Loading branch information
haya3218 committed Feb 10, 2021
1 parent 486acbb commit b4ad4c9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
11 changes: 0 additions & 11 deletions source/OutdatedSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ class OutdatedSubState extends MusicBeatState
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, FlxG.width,
"HEY! You're running an outdated version of the game!\nCurrent version is "
+ ver
+ " while the most recent version is "
+ NGio.GAME_VER
+ "! Press Space to go to itch.io, or ESCAPE to ignore this!!",
32);
txt.setFormat("VCR OSD Mono", 32, FlxColor.WHITE, CENTER);
txt.screenCenter();
add(txt);
}

override function update(elapsed:Float)
Expand Down
14 changes: 1 addition & 13 deletions source/TitleState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -271,19 +271,7 @@ class TitleState extends MusicBeatState

new FlxTimer().start(2, function(tmr:FlxTimer)
{
// Check if version is outdated

var version:String = "v" + Application.current.meta.get('version');

if (version.trim() != NGio.GAME_VER.trim() && !OutdatedSubState.leftState)
{
trace('OLD VERSION!');
FlxG.switchState(new OutdatedSubState());
}
else
{
FlxG.switchState(new MainMenuState());
}
FlxG.switchState(new MainMenuState());
});
// FlxG.sound.play('assets/music/titleShoot' + TitleState.soundExt, 0.7);
}
Expand Down

0 comments on commit b4ad4c9

Please sign in to comment.