Started work on round 2 and 3 camera setups.
This commit is contained in:
@@ -44,7 +44,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 10
|
||||
Data: 8
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
@@ -410,25 +410,25 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _Cameras
|
||||
Data: _CameraController
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 26|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Cameras
|
||||
Data: _CameraController
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 27|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.Camera[], UnityEngine.CoreModule
|
||||
Data: CameraControllerBase, Assembly-CSharp
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 27
|
||||
Data: 4
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -479,142 +479,16 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _CameraAnchors
|
||||
Data: _AllowInteractionFromHostCard
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 31|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _CameraAnchors
|
||||
Data: _AllowInteractionFromHostCard
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 32|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: CameraAnchor[], Assembly-CSharp
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 33|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.Component[], UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 34|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 35|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _CameraController
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _CameraController
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 37|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: CameraControllerBase, Assembly-CSharp
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 4
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 38|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 39|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _AllowInteractionFromHostCard
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 40|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _AllowInteractionFromHostCard
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 41|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean, mscorlib
|
||||
@@ -623,7 +497,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 41
|
||||
Data: 32
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -638,7 +512,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 42|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 33|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
|
||||
@@ -50,8 +50,6 @@ public class GameManagerBase : UdonSharpBehaviour
|
||||
|
||||
[Space]
|
||||
|
||||
[SerializeField] protected Camera[] _Cameras;
|
||||
[SerializeField] protected CameraAnchor[] _CameraAnchors;
|
||||
[SerializeField] protected CameraControllerBase _CameraController;
|
||||
|
||||
|
||||
@@ -109,11 +107,6 @@ public class GameManagerBase : UdonSharpBehaviour
|
||||
{
|
||||
SetOwnershipOfObjects(_CaseManager.GetHostOwner());
|
||||
|
||||
for(int i = 0; i < _Cameras.Length && i < _CameraAnchors.Length; i++)
|
||||
{
|
||||
_CameraAnchors[i].AttachCamera(_Cameras[i]);
|
||||
}
|
||||
|
||||
_AllowInteractionFromHostCard = true;
|
||||
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(EnablePlayerMicrophone), true);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,6 @@ using VRC.SDK3.UdonNetworkCalling;
|
||||
using VRC.Udon.Common.Interfaces;
|
||||
using VRC.SDKBase;
|
||||
using VRC.SDK3.StringLoading;
|
||||
using CameraSystem;
|
||||
|
||||
|
||||
public enum PresentationMedium
|
||||
@@ -90,6 +89,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All, "PlayMusic", MusicEventType.WhereInTheWorld);
|
||||
SendCustomEventDelayedSeconds(nameof(PlaySecondPartOfThemeMusic), 3.6666666666f);
|
||||
|
||||
_CameraControllerRound1.InitialiseCameras();
|
||||
_CameraControllerRound1.ActivateHostCameraTrigger();
|
||||
|
||||
DisableInteraction();
|
||||
@@ -118,6 +118,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
Networking.SetOwner(NewOwner, _ArrivalDisplay.gameObject);
|
||||
|
||||
Networking.SetOwner(NewOwner, _CameraController.gameObject);
|
||||
Networking.SetOwner(NewOwner, _CameraControllerRound1.gameObject);
|
||||
|
||||
base.SetOwnershipOfObjects(NewOwner);
|
||||
}
|
||||
@@ -558,6 +559,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
EnableInteraction("Reveal Choice 2");
|
||||
}
|
||||
|
||||
private void MultipleChoiceRevealChoice2()
|
||||
{
|
||||
_VideoPlayer.SubMapIndex = 2;
|
||||
@@ -574,6 +576,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
EnableInteraction("Reveal Choice 3");
|
||||
}
|
||||
|
||||
private void MultipleChoiceRevealChoice3()
|
||||
{
|
||||
_VideoPlayer.SubMapIndex = 3;
|
||||
@@ -645,6 +648,45 @@ public class GameManagerRound1 : GameManagerBase
|
||||
}
|
||||
}
|
||||
|
||||
EnableInteraction("Focus On Player 1");
|
||||
}
|
||||
|
||||
private void MultipleChoiceFocusOnPlayer1()
|
||||
{
|
||||
for (int i = 0; i < _PlayerPodiums.Length; i++)
|
||||
{
|
||||
_PlayerPodiums[i].HighlightPodium(false);
|
||||
}
|
||||
_PlayerPodiums[0].HighlightPodium(true);
|
||||
|
||||
_CameraControllerRound1.SwitchToPlayer1Camera();
|
||||
|
||||
EnableInteraction("Focus On Player 2");
|
||||
}
|
||||
|
||||
private void MultipleChoiceFocusOnPlayer2()
|
||||
{
|
||||
for (int i = 0; i < _PlayerPodiums.Length; i++)
|
||||
{
|
||||
_PlayerPodiums[i].HighlightPodium(false);
|
||||
}
|
||||
_PlayerPodiums[1].HighlightPodium(true);
|
||||
|
||||
_CameraControllerRound1.SwitchToPlayer2Camera();
|
||||
|
||||
EnableInteraction("Focus On Player 3");
|
||||
}
|
||||
|
||||
private void MultipleChoiceFocusOnPlayer3()
|
||||
{
|
||||
for (int i = 0; i < _PlayerPodiums.Length; i++)
|
||||
{
|
||||
_PlayerPodiums[i].HighlightPodium(false);
|
||||
}
|
||||
_PlayerPodiums[2].HighlightPodium(true);
|
||||
|
||||
_CameraControllerRound1.SwitchToPlayer3Camera();
|
||||
|
||||
EnableInteraction("Reveal Answers And Assign Points");
|
||||
}
|
||||
|
||||
@@ -652,6 +694,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
{
|
||||
for (int i = 0; i < _PlayerPodiums.Length; i++)
|
||||
{
|
||||
_PlayerPodiums[i].HighlightPodium(false);
|
||||
_PlayerPodiums[i].SendCustomNetworkEvent(NetworkEventTarget.Owner, "ShowAuxiliaryMapScreen", true);
|
||||
}
|
||||
|
||||
@@ -682,7 +725,6 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
_CameraControllerRound1.SwitchToVideoPlayerCamera();
|
||||
|
||||
|
||||
EnableInteraction("Next Question");
|
||||
}
|
||||
|
||||
@@ -1722,13 +1764,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: MultipleChoiceRevealAnswersAndAssignPoints(); break;
|
||||
case 7: AdvanceToNextQuestion(); break;
|
||||
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;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -36,12 +36,24 @@ public class GameManagerRound2 : GameManagerBase
|
||||
[UdonSynced] private int _CurrentPlayerCounter = 0;
|
||||
[UdonSynced] private string[] _Players = new string[2];
|
||||
|
||||
private CameraControllerRound2 _CameraControllerRound2 = null;
|
||||
|
||||
private readonly Color COLOR_STANDARD = new Color(0.78431f, 0.78431f, 0.78431f);
|
||||
private readonly Color COLOR_RED = new Color(0.78431f, 0.0f, 0.0f);
|
||||
private readonly Color COLOR_YELLOW = new Color(0.78431f, 0.78431f, 0.0f);
|
||||
private readonly Color COLOR_GREEN = new Color(0.0f, 0.78431f, 0.0f);
|
||||
|
||||
|
||||
void Start()
|
||||
{
|
||||
_CameraControllerRound2 = (CameraControllerRound2)_CameraController;
|
||||
if (_CameraControllerRound2 == null)
|
||||
{
|
||||
Debug.LogError("Camera controller is the wrong type. This will cause a crash for sure.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void InitialiseGameMode()
|
||||
{
|
||||
base.InitialiseGameMode();
|
||||
@@ -58,6 +70,8 @@ public class GameManagerRound2 : GameManagerBase
|
||||
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(EnableAudienceSilencer), true);
|
||||
|
||||
_CameraControllerRound2.InitialiseCameras();
|
||||
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
@@ -86,6 +100,9 @@ public class GameManagerRound2 : GameManagerBase
|
||||
Networking.SetOwner(NewOwner, _JailPlayer.gameObject);
|
||||
Networking.SetOwner(NewOwner, _JailPhone.gameObject);
|
||||
|
||||
Networking.SetOwner(NewOwner, _CameraController.gameObject);
|
||||
Networking.SetOwner(NewOwner, _CameraControllerRound2.gameObject);
|
||||
|
||||
base.SetOwnershipOfObjects(NewOwner);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -33,12 +33,12 @@ public enum GameStatus
|
||||
public class GameManagerRound3 : GameManagerBase
|
||||
{
|
||||
[Space, Header("Camera Controls")]
|
||||
[SerializeField] private CameraTimedSwitcher _HostPlayerTimerToggle;
|
||||
[SerializeField] private GameObject _CameraTriggersGroup;
|
||||
[SerializeField] private Camera _HostCamera;
|
||||
[SerializeField] private CameraAnchor[] _HostCameraAnchors;
|
||||
[SerializeField] private Camera _PlayerCamera;
|
||||
[SerializeField] private CameraAnchor[] _PlayerCameraAnchors;
|
||||
//[SerializeField] private CameraTimedSwitcher _HostPlayerTimerToggle;
|
||||
//[SerializeField] private GameObject _CameraTriggersGroup;
|
||||
//[SerializeField] private Camera _HostCamera;
|
||||
//[SerializeField] private CameraAnchor[] _HostCameraAnchors;
|
||||
//[SerializeField] private Camera _PlayerCamera;
|
||||
//[SerializeField] private CameraAnchor[] _PlayerCameraAnchors;
|
||||
|
||||
[Space]
|
||||
|
||||
@@ -64,6 +64,18 @@ public class GameManagerRound3 : GameManagerBase
|
||||
private const int MAX_SUCCESS_COUNT = 8;
|
||||
private const int MAX_FAILURE_COUNT = 2;
|
||||
|
||||
private CameraControllerRound3 _CameraControllerRound3 = null;
|
||||
|
||||
|
||||
void Start()
|
||||
{
|
||||
_CameraControllerRound3 = (CameraControllerRound3)_CameraController;
|
||||
if (_CameraControllerRound3 == null)
|
||||
{
|
||||
Debug.LogError("Camera controller is the wrong type. This will cause a crash for sure.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void InitialiseGameMode()
|
||||
{
|
||||
@@ -85,12 +97,14 @@ public class GameManagerRound3 : GameManagerBase
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(ActivateCameraSwitchers), false);
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(EnableAudienceSilencer), false);
|
||||
|
||||
_CameraControllerRound3.InitialiseCameras();
|
||||
|
||||
RequestSerialization();
|
||||
}
|
||||
[NetworkCallable]
|
||||
public void ActivateCameraSwitchers(bool Activate)
|
||||
{
|
||||
_CameraTriggersGroup.SetActive(Activate);
|
||||
//_CameraTriggersGroup.SetActive(Activate);
|
||||
}
|
||||
|
||||
public override void DeinitialiseGameMode()
|
||||
@@ -108,10 +122,13 @@ public class GameManagerRound3 : GameManagerBase
|
||||
for (int i = 0; i < _Markers.Length; i++)
|
||||
Networking.SetOwner(NewOwner, _Markers[i].gameObject);
|
||||
|
||||
Networking.SetOwner(NewOwner, _HostPlayerTimerToggle.gameObject);
|
||||
Networking.SetOwner(NewOwner, _CameraTriggersGroup);
|
||||
Networking.SetOwner(NewOwner, _CaptureCarmenNewspaper.gameObject);
|
||||
Networking.SetOwner(NewOwner, _EndingPlayer.gameObject);
|
||||
//Networking.SetOwner(NewOwner, _HostPlayerTimerToggle.gameObject);
|
||||
//Networking.SetOwner(NewOwner, _CameraTriggersGroup);
|
||||
//Networking.SetOwner(NewOwner, _CaptureCarmenNewspaper.gameObject);
|
||||
//Networking.SetOwner(NewOwner, _EndingPlayer.gameObject);
|
||||
|
||||
Networking.SetOwner(NewOwner, _CameraController.gameObject);
|
||||
Networking.SetOwner(NewOwner, _CameraControllerRound3.gameObject);
|
||||
|
||||
base.SetOwnershipOfObjects(NewOwner);
|
||||
}
|
||||
@@ -175,7 +192,7 @@ public class GameManagerRound3 : GameManagerBase
|
||||
|
||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All, "FadeOutMusic");
|
||||
|
||||
_HostPlayerTimerToggle.Activate = true;
|
||||
//_HostPlayerTimerToggle.Activate = true;
|
||||
|
||||
EnableInteraction("Begin");
|
||||
}
|
||||
@@ -186,7 +203,7 @@ public class GameManagerRound3 : GameManagerBase
|
||||
_GameStatus = GameStatus.Begin;
|
||||
UpdateInterface();
|
||||
|
||||
_HostPlayerTimerToggle.Activate = false;
|
||||
//_HostPlayerTimerToggle.Activate = false;
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(ActivateCameraSwitchers), true);
|
||||
GetCurrentMarker().SendCustomNetworkEvent(NetworkEventTarget.Owner, "Activated", true);
|
||||
|
||||
@@ -319,8 +336,8 @@ public class GameManagerRound3 : GameManagerBase
|
||||
GetCurrentMarker().SendCustomNetworkEvent(NetworkEventTarget.Owner, "Activated", true);
|
||||
}
|
||||
|
||||
_HostCameraAnchors[ActiveMarker].AttachCamera(_HostCamera);
|
||||
_PlayerCameraAnchors[ActiveMarker].AttachCamera(_PlayerCamera);
|
||||
//_HostCameraAnchors[ActiveMarker].AttachCamera(_HostCamera);
|
||||
//_PlayerCameraAnchors[ActiveMarker].AttachCamera(_PlayerCamera);
|
||||
}
|
||||
|
||||
[NetworkCallable]
|
||||
|
||||
Reference in New Issue
Block a user