- Improved camera switching code to allow for more versatile camera direction.

- Added additional camera layouts for round 2 and 3.
This commit is contained in:
2025-12-20 23:19:19 -05:00
parent 08897ba99f
commit 82606881b3
29 changed files with 1294 additions and 420 deletions
@@ -169,6 +169,7 @@ public class GameManagerRound1 : GameManagerBase
private void PlayIntroVideo()
{
_CameraControllerRound1.DeactivateHostCameraTrigger();
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToHostCamera();
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All, "FadeOutMusic");
@@ -313,6 +314,7 @@ public class GameManagerRound1 : GameManagerBase
{
case 0:
{
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoMusicClueCamera();
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All, "PlaySFX", SFXEventType.VideoMusicClue);
@@ -540,6 +542,7 @@ public class GameManagerRound1 : GameManagerBase
_QuestionCorrectResponse = (int)_CurrentQuestion["Correct Response"].Number;
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
EnableInteraction("Reveal Choice 1");
@@ -557,6 +560,7 @@ public class GameManagerRound1 : GameManagerBase
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.As5);
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
EnableInteraction("Reveal Choice 2");
@@ -574,6 +578,7 @@ public class GameManagerRound1 : GameManagerBase
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.C6);
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
EnableInteraction("Reveal Choice 3");
@@ -619,10 +624,11 @@ public class GameManagerRound1 : GameManagerBase
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.D6);
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
_CameraControllerRound1.SendCustomEventDelayedSeconds("ActivateHostAllPlayersCameraSwitcher", 2.0f);
EnableInteraction("Lock Answers");
EnableInteraction("Get Player 1's Response");
}
private void MultipleChoiceLockAnswers()
@@ -650,46 +656,40 @@ public class GameManagerRound1 : GameManagerBase
}
}
EnableInteraction("Focus On Player 1");
EnableInteraction("Get Player 1's Response");
}
private void MultipleChoiceFocusOnPlayer1()
private void MultipleChoiceFocusOnPlayer(int PlayerNumber)
{
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
_PlayerPodiums[i].SendCustomNetworkEvent(NetworkEventTarget.All, "LockInChoice");
_PlayerPodiums[i].SendCustomNetworkEvent(NetworkEventTarget.Owner, "ShowAuxiliaryMapScreen", false);
}
HostCardBetweenRoundsInterface Interface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
Interface.CommentUI.text = "What did you pick?";
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
_PlayerPodiums[i].HighlightPodium(false);
}
_PlayerPodiums[0].HighlightPodium(true);
int PlayerIndex = PlayerNumber - 1;
_PlayerPodiums[PlayerIndex].HighlightPodium(true);
Interface.HeaderUI.text = _PlayerPodiums[PlayerIndex].PlayerName;
_CameraControllerRound1.SwitchToPlayer1Camera();
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SendCustomEvent("SwitchToPlayer" + PlayerNumber + "Camera");
EnableInteraction("Focus On Player 2");
}
private void MultipleChoiceFocusOnPlayer2()
{
for (int i = 0; i < _PlayerPodiums.Length; i++)
if (PlayerNumber < _PlayerPodiums.Length)
{
_PlayerPodiums[i].HighlightPodium(false);
EnableInteraction("Get Player " + (PlayerNumber + 1) + "'s Response");
}
_PlayerPodiums[1].HighlightPodium(true);
_CameraControllerRound1.SwitchToPlayer2Camera();
EnableInteraction("Focus On Player 3");
}
private void MultipleChoiceFocusOnPlayer3()
{
for (int i = 0; i < _PlayerPodiums.Length; i++)
else
{
_PlayerPodiums[i].HighlightPodium(false);
EnableInteraction("Reveal Correct Answer");
}
_PlayerPodiums[2].HighlightPodium(true);
_CameraControllerRound1.SwitchToPlayer3Camera();
EnableInteraction("Reveal Answers And Assign Points");
}
private void MultipleChoiceRevealAnswersAndAssignPoints()
@@ -725,6 +725,7 @@ public class GameManagerRound1 : GameManagerBase
_VideoPlayer.FlashCorrectAnswer = true;
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
EnableInteraction("Next Question");
@@ -733,6 +734,7 @@ public class GameManagerRound1 : GameManagerBase
private void BeginLightningRound()
{
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToWideShotCamera();
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlayLightningRoundAnimation));
_CameraControllerRound1.SendCustomEventDelayedSeconds("ActivateHostAllPlayersCameraSwitcher", 3.0f);
@@ -885,6 +887,7 @@ public class GameManagerRound1 : GameManagerBase
private void PlayTheChaseMusic()
{
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToWideShotCamera();
_CameraControllerRound1.SendCustomEventDelayedSeconds("ActivateHostAllPlayersCameraSwitcher", 5.0f);
@@ -947,6 +950,7 @@ public class GameManagerRound1 : GameManagerBase
{
_VideoPlayer.SubMapIndex = _QuestionSubstage * 2;
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
}
@@ -979,6 +983,7 @@ public class GameManagerRound1 : GameManagerBase
}
public void TheChaseEndClue()
{
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
@@ -1015,8 +1020,7 @@ public class GameManagerRound1 : GameManagerBase
"- Now it's time for the final clue of this round, which means you have to decide how many of your ACME Crimebucks you want to risk.\n" +
"- If you're right, we'll add that amount to your score.\n" +
"- If you're not right, we'll subtract that amount from your score.\n" +
"- You can risk 0, 10, 20, 30, 40, or 50 ACME Crimebucks.\n\n" +
"- Choose how much to risk by placing your wager to the other side of your podium.";
"- You can risk 0, 10, 20, 30, 40, or 50 ACME Crimebucks.";
LoadMapsIntoQueue();
@@ -1055,6 +1059,7 @@ public class GameManagerRound1 : GameManagerBase
"PlayMusic", MusicEventType.ThinkAboutIt);
SendCustomEventDelayedSeconds(nameof(ThinkAboutItCountdownFinished), 15.0f);
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SendCustomEventDelayedSeconds("SwitchToVideoPlayerCamera", 2.0f);
_CameraControllerRound1.SendCustomEventDelayedSeconds("SwitchToPlayer1Camera", 4.5f);
_CameraControllerRound1.SendCustomEventDelayedSeconds("SwitchToPlayer2Camera", 7.0f);
@@ -1117,6 +1122,7 @@ public class GameManagerRound1 : GameManagerBase
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.As5);
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
EnableInteraction("Reveal Choice 2");
@@ -1132,6 +1138,7 @@ public class GameManagerRound1 : GameManagerBase
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.C6);
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
EnableInteraction("Reveal Choice 3");
@@ -1176,6 +1183,7 @@ public class GameManagerRound1 : GameManagerBase
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
"PlaySFXAtPitch", SFXEventType.Ding, AudioManager.D6);
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
_CameraControllerRound1.SendCustomEventDelayedSeconds("ActivateHostAllPlayersCameraSwitcher", 2.0f);
@@ -1242,6 +1250,7 @@ public class GameManagerRound1 : GameManagerBase
{
int PlayerNumber = _FinalRoundPlayersSortedByScore[PlayerPlace - 1];
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SendCustomEvent("SwitchToPlayer" + PlayerNumber + "Camera");
HostCardBetweenRoundsInterface Interface =
@@ -1274,6 +1283,7 @@ public class GameManagerRound1 : GameManagerBase
EnableInteraction("Reveal Next Player Answer");
}
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SendCustomEventDelayedSeconds("SwitchToAllPlayersCamera", 1.5f);
_CameraControllerRound1.SendCustomEventDelayedSeconds("ActivateHostAllPlayersCameraSwitcher", 4.0f);
}
@@ -1438,6 +1448,7 @@ public class GameManagerRound1 : GameManagerBase
{
_Modem.Teleport();
SendCustomEventDelayedSeconds(nameof(_ContinueToRound2_Private), 2.5f);
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToModemCamera();
}
public void _ContinueToRound2_Private()
@@ -1683,15 +1694,19 @@ 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;
}
@@ -1766,16 +1781,16 @@ public class GameManagerRound1 : GameManagerBase
{
switch (_QuestionStage)
{
case 1: InitialiseCluePresentation(); break;
case 2: MultipleChoiceRevealChoice1(); break;
case 3: MultipleChoiceRevealChoice2(); break;
case 4: MultipleChoiceRevealChoice3(); break;
case 5: MultipleChoiceLockAnswers(); break;
case 6: MultipleChoiceFocusOnPlayer1(); break;
case 7: MultipleChoiceFocusOnPlayer2(); break;
case 8: MultipleChoiceFocusOnPlayer3(); break;
case 9: MultipleChoiceRevealAnswersAndAssignPoints(); break;
case 10: AdvanceToNextQuestion(); break;
case 1: InitialiseCluePresentation(); break;
case 2: MultipleChoiceRevealChoice1(); break;
case 3: MultipleChoiceRevealChoice2(); break;
case 4: MultipleChoiceRevealChoice3(); break;
//case 5: MultipleChoiceLockAnswers(); break;
case 5: MultipleChoiceFocusOnPlayer(1); break;
case 6: MultipleChoiceFocusOnPlayer(2); break;
case 7: MultipleChoiceFocusOnPlayer(3); break;
case 8: MultipleChoiceRevealAnswersAndAssignPoints(); break;
case 9: AdvanceToNextQuestion(); break;
default: break;
}
}
@@ -1863,14 +1878,15 @@ public class GameManagerRound1 : GameManagerBase
private void _PlayVideo()
{
_CameraControllerRound1.SwitchToHostCamera();
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToHostCamera();
_VideoPlayer.PlayVideo = true;
SendCustomEventDelayedSeconds(nameof(SwitchToTVCamera), 2.0f);
}
public void SwitchToTVCamera()
{
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToVideoPlayerCamera();
SendCustomEventDelayedSeconds(nameof(CheckVideoPlayerTimeToEnd), 0.25f);
}
@@ -1880,6 +1896,7 @@ public class GameManagerRound1 : GameManagerBase
{
if ((_VideoPlayer.GetVideoDuration() - _VideoPlayer.GetVideoTime()) <= 2.0f)
{
_CameraControllerRound1.DisableAllSwitchers();
_CameraControllerRound1.SwitchToHostCamera();
}
else
@@ -71,6 +71,8 @@ public class GameManagerRound2 : GameManagerBase
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(EnableAudienceSilencer), true);
_CameraControllerRound2.InitialiseCameras();
_CameraControllerRound2.DisableAllSwitchers();
_CameraControllerRound2.ActivateHostAllPlayersCameraTrigger();
RequestSerialization();
}
@@ -162,6 +164,9 @@ public class GameManagerRound2 : GameManagerBase
private void DisplayBriefing()
{
_CameraControllerRound2.DeactivateHostAllPlayersCameraTrigger();
_CameraControllerRound2.ActivateHostPlayersAndWideShotCameraSwitcher();
HostCardRecoverTheLootExplainerInterface RecoverTheLootInterface =
(HostCardRecoverTheLootExplainerInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLootExplainer);
@@ -190,6 +190,7 @@ public class GameManagerRound3 : GameManagerBase
_GameStatus = GameStatus.Begin;
UpdateInterface();
_CameraControllerRound3.DisableAllSwitchers();
_CameraControllerRound3.HostPlayerTimerToggle.Activate = false;
_CameraControllerRound3.ActivatePlayfieldSwitchTriggerGroup = true;
GetCurrentMarker().SendCustomNetworkEvent(NetworkEventTarget.Owner, "Activated", true);
@@ -323,8 +324,7 @@ public class GameManagerRound3 : GameManagerBase
GetCurrentMarker().SendCustomNetworkEvent(NetworkEventTarget.Owner, "Activated", true);
}
//_HostCameraAnchors[ActiveMarker].AttachCamera(_HostCamera);
//_PlayerCameraAnchors[ActiveMarker].AttachCamera(_PlayerCamera);
_CameraControllerRound3.MarkerCameraAnchorPosition = ActiveMarker;
}
[NetworkCallable]