mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-26 15:07:14 +00:00
Move TitleState into its own package.
This commit is contained in:
parent
7ee86f37af
commit
3f99e0e3da
|
@ -24,6 +24,7 @@ import funkin.play.song.SongData.SongDataParser;
|
|||
import funkin.play.stage.StageData.StageDataParser;
|
||||
import funkin.play.character.CharacterData.CharacterDataParser;
|
||||
import funkin.modding.module.ModuleHandler;
|
||||
import funkin.ui.title.TitleState;
|
||||
#if discord_rpc
|
||||
import Discord.DiscordClient;
|
||||
#end
|
||||
|
|
|
@ -22,6 +22,7 @@ import funkin.shaderslmfao.ScreenWipeShader;
|
|||
import funkin.ui.AtlasMenuList;
|
||||
import funkin.ui.MenuList.MenuItem;
|
||||
import funkin.ui.MenuList;
|
||||
import funkin.ui.title.TitleState;
|
||||
import funkin.ui.story.StoryMenuState;
|
||||
import funkin.ui.OptionsState;
|
||||
import funkin.ui.PreferencesMenu;
|
||||
|
|
|
@ -192,7 +192,6 @@ class TitleState extends MusicBeatState
|
|||
else
|
||||
initialized = true;
|
||||
|
||||
if (FlxG.sound.music != null) FlxG.sound.music.onComplete = function() FlxG.switchState(new VideoState());
|
||||
}
|
||||
|
||||
function playMenuMusic():Void
|
||||
|
@ -304,50 +303,19 @@ class TitleState extends MusicBeatState
|
|||
|
||||
var targetState:FlxState = new MainMenuState();
|
||||
|
||||
#if newgrounds
|
||||
if (!OutdatedSubState.leftState)
|
||||
{
|
||||
NGio.checkVersion(function(version) {
|
||||
// Check if version is outdated
|
||||
var localVersion:String = "v" + Application.current.meta.get('version');
|
||||
var onlineVersion = version.split(" ")[0].trim();
|
||||
if (version.trim() != onlineVersion)
|
||||
{
|
||||
trace('OLD VERSION!');
|
||||
// targetState = new OutdatedSubState();
|
||||
}
|
||||
else
|
||||
{
|
||||
// targetState = new MainMenuState();
|
||||
}
|
||||
// REDO FOR ITCH/FINAL SHIT
|
||||
});
|
||||
}
|
||||
#end
|
||||
new FlxTimer().start(2, function(tmr:FlxTimer) {
|
||||
// These assets are very unlikely to be used for the rest of gameplay, so it unloads them from cache/memory
|
||||
// Saves about 50mb of RAM or so???
|
||||
Assets.cache.clear(Paths.image('gfDanceTitle'));
|
||||
Assets.cache.clear(Paths.image('logoBumpin'));
|
||||
Assets.cache.clear(Paths.image('titleEnter'));
|
||||
// TODO: This BREAKS the title screen if you return back to it! Figure out how to fix that.
|
||||
// Assets.cache.clear(Paths.image('gfDanceTitle'));
|
||||
// Assets.cache.clear(Paths.image('logoBumpin'));
|
||||
// Assets.cache.clear(Paths.image('titleEnter'));
|
||||
// ngSpr??
|
||||
FlxG.switchState(targetState);
|
||||
});
|
||||
// FlxG.sound.play(Paths.music('titleShoot'), 0.7);
|
||||
}
|
||||
if (pressedEnter && !skippedIntro && initialized) skipIntro();
|
||||
/*
|
||||
#if web
|
||||
if (!initialized && controls.ACCEPT)
|
||||
{
|
||||
// netStream.dispose();
|
||||
// FlxG.stage.removeChild(video);
|
||||
|
||||
startIntro();
|
||||
skipIntro();
|
||||
}
|
||||
#end
|
||||
*/
|
||||
|
||||
if (controls.UI_LEFT) swagShader.update(-elapsed * 0.1);
|
||||
if (controls.UI_RIGHT) swagShader.update(elapsed * 0.1);
|
||||
|
@ -358,12 +326,6 @@ class TitleState extends MusicBeatState
|
|||
override function draw()
|
||||
{
|
||||
super.draw();
|
||||
|
||||
// if (gfDance != null)
|
||||
// {
|
||||
// trace(gfDance.frame.uv);
|
||||
// maskShader.frameUV = gfDance.frame.uv;
|
||||
// }
|
||||
}
|
||||
|
||||
var cheatArray:Array<Int> = [0x0001, 0x0010, 0x0001, 0x0010, 0x0100, 0x1000, 0x0100, 0x1000];
|
Loading…
Reference in a new issue