1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-23 21:56:46 +00:00

Merge branch 'richtrash21/freeplay-camera-optimization' into develop

This commit is contained in:
EliteMasterEric 2024-06-07 21:21:11 -04:00
commit d19e9e62fa

View file

@ -230,6 +230,12 @@ class FreeplayState extends MusicBeatSubState
FlxTransitionableState.skipNextTransIn = true;
// dedicated camera for the state so we don't need to fuk around with camera scrolls from the mainmenu / elsewhere
funnyCam = new FunkinCamera('freeplayFunny', 0, 0, FlxG.width, FlxG.height);
funnyCam.bgColor = FlxColor.TRANSPARENT;
FlxG.cameras.add(funnyCam, false);
this.cameras = [funnyCam];
if (stickerSubState != null)
{
this.persistentUpdate = true;
@ -652,6 +658,9 @@ class FreeplayState extends MusicBeatSubState
alsoOrangeLOL.visible = true;
grpTxtScrolls.visible = true;
// render optimisation
if (_parentState != null) _parentState.persistentDraw = false;
cardGlow.visible = true;
FlxTween.tween(cardGlow, {alpha: 0, "scale.x": 1.2, "scale.y": 1.2}, 0.45, {ease: FlxEase.sineOut});
@ -1571,6 +1580,8 @@ class FreeplayState extends MusicBeatSubState
{
clearDaCache(daSong.songName);
}
// remove and destroy freeplay camera
FlxG.cameras.remove(funnyCam);
}
function changeDiff(change:Int = 0, force:Bool = false):Void