Skip to content

Commit

Permalink
Update MainMenuState.hx
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Oct 14, 2024
1 parent 6740aa4 commit 9f730d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/states/MenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class MenuState extends ExtendableState {

camFollow = new FlxObject(0, 0, 1, 1);
camFollow.screenCenter(X);
add(camFollow);

var bg:FlxSprite = new FlxSprite().loadGraphic(Paths.image('menu/backgrounds/title_bg'));
bg.scrollFactor.set();
Expand Down Expand Up @@ -53,7 +54,7 @@ class MenuState extends ExtendableState {

changeSelection(0, false, false);

FlxG.camera.follow(camFollow, LOCKON, 0.25);
FlxG.camera.follow(camFollow, null, 0.15);
}

override function update(elapsed:Float) {
Expand Down Expand Up @@ -128,7 +129,7 @@ class MenuState extends ExtendableState {
grpSelection.forEach((spr:FlxSprite) -> {
spr.alpha = (spr.ID == curSelected) ? 1 : 0.6;
if (spr.ID == curSelected) {
camFollow.y = spr.y;
camFollow.y = spr.getGraphicMidpoint().y;
if (doZoomThing) {
spr.scale.set(0.5, 0.5);
FlxTween.cancelTweensOf(spr.scale);
Expand Down

0 comments on commit 9f730d7

Please sign in to comment.