- Refactored CameraTimedSwitcher to use an internal timer instead of delays.

- Added extra switchers to rounds 1 and 2 to better control camera transitions.
- Fixed improper camera switches on incorrect answers during round 2.
This commit is contained in:
2026-03-24 05:16:30 -04:00
parent 15cf4be640
commit 001be2af0e
20 changed files with 1129 additions and 521 deletions
@@ -971,8 +971,7 @@ public class GameManagerRound1 : GameManagerBase
}
Interface.OtherButton.interactable = true;
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
_CameraControllerRound1.ActivateTheChaseMonitorToAllPlayersCameraSwitcher();
}
private void TheChaseCheckAnswer(int Answer)
@@ -1004,9 +1003,6 @@ public class GameManagerRound1 : GameManagerBase
}
public void TheChaseEndClue()
{
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
HostCardTheChaseInterface Interface =
(HostCardTheChaseInterface)GetHostCardInterface(RoundSegmentType.TheChase);
@@ -1022,6 +1018,8 @@ public class GameManagerRound1 : GameManagerBase
SendCustomEventDelayedSeconds(nameof(_TheChaseEndClue_AdvanceMap_Private), 0.3333333333333f);
_CameraControllerRound1.ActivateTheChaseMonitorToAllPlayersCameraSwitcher();
AdvanceQuestion();
}
public void _TheChaseEndClue_AdvanceMap_Private()
@@ -1714,19 +1712,15 @@ public class GameManagerRound1 : GameManagerBase
switch (_BuzzedInPlayer)
{
case 1:
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToPlayer1Camera();
break;
case 2:
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToPlayer2Camera();
break;
case 3:
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToPlayer3Camera();
break;
default:
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToAllPlayersCamera();
break;
}
@@ -1898,16 +1892,10 @@ public class GameManagerRound1 : GameManagerBase
private void _PlayVideo()
{
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToHostCamera();
_CameraControllerRound1.ActivateHostToMonitorCameraSwitcher();
_VideoPlayer.PlayVideo = true;
SendCustomEventDelayedSeconds(nameof(SwitchToTVCamera), 2.0f);
}
public void SwitchToTVCamera()
{
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
SendCustomEventDelayedSeconds(nameof(CheckVideoPlayerTimeToEnd), 0.25f);
}
public void CheckVideoPlayerTimeToEnd()
@@ -1916,8 +1904,7 @@ public class GameManagerRound1 : GameManagerBase
{
if ((_VideoPlayer.GetVideoDuration() - _VideoPlayer.GetVideoTime()) <= 2.0f)
{
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToHostCamera();
_CameraControllerRound1.ActivateHostAllPlayersCameraSwitcher();
}
else
{
@@ -271,6 +271,8 @@ public class GameManagerRound2 : GameManagerBase
Interface.SetComment("Nothing there.", COLOR_STANDARD);
Interface.ActivateAllPanelButtons(false);
_CameraControllerRound2.ActivateLocationBoardAndCurrentPlayerCameraSwitcher();
}
public void AlreadyTried()
@@ -280,6 +282,8 @@ public class GameManagerRound2 : GameManagerBase
Interface.SetComment("Already tried that one.", COLOR_STANDARD);
Interface.ActivateAllPanelButtons(false);
_CameraControllerRound2.ActivateLocationBoardAndCurrentPlayerCameraSwitcher();
}
public void NiceStrategy()
@@ -289,6 +293,8 @@ public class GameManagerRound2 : GameManagerBase
Interface.SetComment("Nice strategy.", COLOR_GREEN);
Interface.ActivateAllPanelButtons(false);
_CameraControllerRound2.ActivateLocationBoardAndCurrentPlayerCameraSwitcher();
}
// This is for when a player wins the game. This should disable all inputs,
@@ -397,8 +403,6 @@ public class GameManagerRound2 : GameManagerBase
HostCardRecoverTheLootInterface Interface =
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
Interface.ActivateAllPanelButtons(true, true);
SwitchToCurrentPlayerAndLocationBoardSwitcher();
}
}
@@ -428,8 +432,6 @@ public class GameManagerRound2 : GameManagerBase
HostCardRecoverTheLootInterface Interface =
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
Interface.ActivateAllPanelButtons(true);
SwitchToCurrentPlayerAndLocationBoardSwitcher();
}
}
@@ -253,7 +253,7 @@ public class GameManagerRound3 : GameManagerBase
UpdateInterface();
_CameraControllerRound3.DisableAllSwitchers();
_CameraControllerRound3.HostPlayerTimerToggle.Activate = false;
_CameraControllerRound3.ActivateHostPlayerCameraSwitcher();
_CameraControllerRound3.ActivatePlayfieldSwitchTriggerGroup = true;
InitialiseGameplayCameraFollowers();