1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-03-28 12:59:52 +00:00

Add camOther to fix zooms on pause and stickers

This commit is contained in:
gamerbross 2024-05-20 02:56:57 +02:00 committed by EliteMasterEric
parent 50b587e3b8
commit 17f5a06256

View file

@ -503,9 +503,9 @@ class PlayState extends MusicBeatSubState
public var camGame:FlxCamera;
/**
* The camera which contains, and controls visibility of, a video cutscene.
* The camera which contains, and controls visibility of, a video cutscene, dialogue, pause menu and sticker transition.
*/
public var camCutscene:FlxCamera;
public var camOther:FlxCamera;
/**
* The combo popups. Includes the real-time combo counter and the rating.
@ -975,7 +975,7 @@ class PlayState extends MusicBeatSubState
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
pauseSubState.camera = camHUD;
pauseSubState.camera = camOther;
openSubState(pauseSubState);
// boyfriendPos.put(); // TODO: Why is this here?
}
@ -1543,12 +1543,12 @@ class PlayState extends MusicBeatSubState
camGame.bgColor = BACKGROUND_COLOR; // Show a pink background behind the stage.
camHUD = new FlxCamera();
camHUD.bgColor.alpha = 0; // Show the game scene behind the camera.
camCutscene = new FlxCamera();
camCutscene.bgColor.alpha = 0; // Show the game scene behind the camera.
camOther = new FlxCamera();
camOther.bgColor.alpha = 0; // Show the game scene behind the camera.
FlxG.cameras.reset(camGame);
FlxG.cameras.add(camHUD, false);
FlxG.cameras.add(camCutscene, false);
FlxG.cameras.add(camOther, false);
// Configure camera follow point.
if (previousCameraFollowPoint != null)
@ -1934,7 +1934,6 @@ class PlayState extends MusicBeatSubState
if (!result) return;
isInCutscene = false;
camCutscene.visible = false;
// TODO: Maybe tween in the camera after any cutscenes.
camHUD.visible = true;
@ -1953,7 +1952,7 @@ class PlayState extends MusicBeatSubState
if (!currentConversation.alive) currentConversation.revive();
currentConversation.completeCallback = onConversationComplete;
currentConversation.cameras = [camCutscene];
currentConversation.cameras = [camOther];
currentConversation.zIndex = 1000;
add(currentConversation);
refresh();
@ -2788,7 +2787,7 @@ class PlayState extends MusicBeatSubState
persistentUpdate = false;
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
pauseSubState.camera = camCutscene;
pauseSubState.camera = camOther;
openSubState(pauseSubState);
}
}
@ -2804,7 +2803,7 @@ class PlayState extends MusicBeatSubState
persistentUpdate = false;
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
pauseSubState.camera = camCutscene;
pauseSubState.camera = camOther;
openSubState(pauseSubState);
}
}