mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
quick title screen optimize
This commit is contained in:
parent
2db47b1ba9
commit
7ebc7e4ffb
2 changed files with 15 additions and 0 deletions
|
@ -2732,6 +2732,14 @@ class PlayState extends MusicBeatState
|
|||
});
|
||||
}
|
||||
|
||||
override function switchTo(nextState:FlxState):Bool
|
||||
{
|
||||
openfl.utils.Assets.cache.clear(Paths.inst(SONG.song));
|
||||
openfl.utils.Assets.cache.clear(Paths.voices(SONG.song));
|
||||
|
||||
return super.switchTo(nextState);
|
||||
}
|
||||
|
||||
function noteMiss(direction:Int = 1):Void
|
||||
{
|
||||
// whole function used to be encased in if (!boyfriend.stunned)
|
||||
|
|
|
@ -465,6 +465,13 @@ class TitleState extends MusicBeatState
|
|||
FlxG.sound.play(Paths.sound('confirmMenu'), 0.7);
|
||||
transitioning = true;
|
||||
// FlxG.sound.music.stop();
|
||||
|
||||
// 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'));
|
||||
|
||||
#if newgrounds
|
||||
if (!OutdatedSubState.leftState)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue