mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-02-16 20:01:49 -05:00
main menu camera fix
This commit is contained in:
parent
25016f45f9
commit
1050176b27
2 changed files with 4 additions and 2 deletions
|
@ -62,7 +62,6 @@ class DebugMenuSubState extends MusicBeatSubState
|
||||||
#if sys
|
#if sys
|
||||||
createItem("OPEN CRASH LOG FOLDER", openLogFolder);
|
createItem("OPEN CRASH LOG FOLDER", openLogFolder);
|
||||||
#end
|
#end
|
||||||
FlxG.camera.focusOn(new FlxPoint(camFocusPoint.x, camFocusPoint.y));
|
|
||||||
FlxG.camera.focusOn(new FlxPoint(camFocusPoint.x, camFocusPoint.y + 500));
|
FlxG.camera.focusOn(new FlxPoint(camFocusPoint.x, camFocusPoint.y + 500));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,8 @@ class MainMenuState extends MusicBeatState
|
||||||
DiscordClient.changePresence("In the Menus", null);
|
DiscordClient.changePresence("In the Menus", null);
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
FlxG.cameras.reset(new FunkinCamera('mainMenu'));
|
||||||
|
|
||||||
transIn = FlxTransitionableState.defaultTransIn;
|
transIn = FlxTransitionableState.defaultTransIn;
|
||||||
transOut = FlxTransitionableState.defaultTransOut;
|
transOut = FlxTransitionableState.defaultTransOut;
|
||||||
|
|
||||||
|
@ -170,7 +172,6 @@ class MainMenuState extends MusicBeatState
|
||||||
|
|
||||||
function resetCamStuff():Void
|
function resetCamStuff():Void
|
||||||
{
|
{
|
||||||
FlxG.cameras.reset(new FunkinCamera('mainMenu'));
|
|
||||||
FlxG.camera.follow(camFollow, null, 0.06);
|
FlxG.camera.follow(camFollow, null, 0.06);
|
||||||
FlxG.camera.snapToTarget();
|
FlxG.camera.snapToTarget();
|
||||||
}
|
}
|
||||||
|
@ -329,6 +330,8 @@ class MainMenuState extends MusicBeatState
|
||||||
persistentUpdate = false;
|
persistentUpdate = false;
|
||||||
|
|
||||||
FlxG.state.openSubState(new DebugMenuSubState());
|
FlxG.state.openSubState(new DebugMenuSubState());
|
||||||
|
// reset camera when debug menu is closed
|
||||||
|
subStateClosed.addOnce(_ -> resetCamStuff());
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue