mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-11-29 15:56:06 +00:00
Merge pull request #2684 from gamerbross/bugfix/camfollow-pause-game
[BUGFIX] Pause Camera Follow when pausing
This commit is contained in:
commit
aace5e2326
|
|
@ -1211,6 +1211,9 @@ class PlayState extends MusicBeatSubState
|
||||||
cameraTweensPausedBySubState.add(cameraZoomTween);
|
cameraTweensPausedBySubState.add(cameraZoomTween);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pause camera follow
|
||||||
|
FlxG.camera.followLerp = 0;
|
||||||
|
|
||||||
for (tween in scrollSpeedTweens)
|
for (tween in scrollSpeedTweens)
|
||||||
{
|
{
|
||||||
if (tween != null && tween.active)
|
if (tween != null && tween.active)
|
||||||
|
|
@ -1255,6 +1258,9 @@ class PlayState extends MusicBeatSubState
|
||||||
}
|
}
|
||||||
cameraTweensPausedBySubState.clear();
|
cameraTweensPausedBySubState.clear();
|
||||||
|
|
||||||
|
// Resume camera follow
|
||||||
|
FlxG.camera.followLerp = Constants.DEFAULT_CAMERA_FOLLOW_RATE;
|
||||||
|
|
||||||
if (currentConversation != null)
|
if (currentConversation != null)
|
||||||
{
|
{
|
||||||
currentConversation.resumeMusic();
|
currentConversation.resumeMusic();
|
||||||
|
|
@ -3070,7 +3076,7 @@ class PlayState extends MusicBeatSubState
|
||||||
FlxG.camera.targetOffset.x += 20;
|
FlxG.camera.targetOffset.x += 20;
|
||||||
|
|
||||||
// Replace zoom animation with a fade out for now.
|
// Replace zoom animation with a fade out for now.
|
||||||
camGame.fade(FlxColor.BLACK, 0.6);
|
FlxG.camera.fade(FlxColor.BLACK, 0.6);
|
||||||
|
|
||||||
FlxTween.tween(camHUD, {alpha: 0}, 0.6,
|
FlxTween.tween(camHUD, {alpha: 0}, 0.6,
|
||||||
{
|
{
|
||||||
|
|
@ -3165,7 +3171,7 @@ class PlayState extends MusicBeatSubState
|
||||||
cancelAllCameraTweens();
|
cancelAllCameraTweens();
|
||||||
}
|
}
|
||||||
|
|
||||||
FlxG.camera.follow(cameraFollowPoint, LOCKON, 0.04);
|
FlxG.camera.follow(cameraFollowPoint, LOCKON, Constants.DEFAULT_CAMERA_FOLLOW_RATE);
|
||||||
FlxG.camera.targetOffset.set();
|
FlxG.camera.targetOffset.set();
|
||||||
|
|
||||||
if (resetZoom)
|
if (resetZoom)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue