Use FunkinCamera on Char Select state.

This commit is contained in:
EliteMasterEric
2024-08-26 13:00:01 -04:00
parent 96c151cf36
commit 8a8ddbfbb5
@@ -104,6 +104,8 @@ class CharSelectSubState extends MusicBeatSubState
{
super.create();
FlxG.cameras.reset(new FunkinCamera('charSelectCam'));
selectSound = new FunkinSound();
selectSound.loadEmbedded(Paths.sound('CS_select'));
selectSound.pitch = 1;
@@ -506,6 +508,16 @@ class CharSelectSubState extends MusicBeatSubState
});
}
// Put this BEFORE the other check, because pressedStart will get turned off if it's on!
if (!pressedSelect && controls.BACK)
{
// Return to the Freeplay state without changing character.
FlxG.switchState(FreeplayState.build(
{
{}
}));
}
if (pressedSelect && controls.BACK)
{
cursorConfirmed.visible = false;
@@ -546,15 +558,6 @@ class CharSelectSubState extends MusicBeatSubState
}
}
if (!pressedSelect && controls.BACK)
{
// Return to the Freeplay state without changing character.
FlxG.switchState(FreeplayState.build(
{
{}
}));
}
updateLockAnims();
camFollow.screenCenter();