- Added victory music to round 2.
- Host card buttons finally properly activate and deactivate during round 2. - Added tags to camera controller errors in each round manager.
This commit is contained in:
@@ -67,7 +67,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
_CameraControllerRound1 = (CameraControllerRound1)_CameraController;
|
||||
if (_CameraControllerRound1 == null)
|
||||
{
|
||||
Debug.LogError("Camera controller is the wrong type. This will cause a crash for sure.");
|
||||
Debug.LogError("[GameManagerRound1] Camera controller is the wrong type. This will cause a crash for sure.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 26
|
||||
Data: 27
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
@@ -1256,16 +1256,70 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _CameraControllerRound2
|
||||
Data: _RoundIsOver
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 82|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _RoundIsOver
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 32
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 32
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 3
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 83|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 84|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
- 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: _CameraControllerRound2
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 85|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _CameraControllerRound2
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 83|System.RuntimeType, mscorlib
|
||||
Data: 86|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: CameraControllerRound2, Assembly-CSharp
|
||||
@@ -1289,7 +1343,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 84|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 87|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -1313,7 +1367,7 @@ MonoBehaviour:
|
||||
Data: _PanelToReveal_Cache
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 85|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 88|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _PanelToReveal_Cache
|
||||
@@ -1335,60 +1389,6 @@ MonoBehaviour:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 86|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
- 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: COLOR_STANDARD
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 87|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: COLOR_STANDARD
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 88|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.Color, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 88
|
||||
- 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: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 89|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
@@ -1412,19 +1412,73 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: COLOR_RED
|
||||
Data: COLOR_STANDARD
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 90|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: COLOR_STANDARD
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 91|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.Color, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 91
|
||||
- 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: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 92|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
- 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: COLOR_RED
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 93|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: COLOR_RED
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 88
|
||||
Data: 91
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 88
|
||||
Data: 91
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -1439,7 +1493,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 91|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 94|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -1463,16 +1517,16 @@ MonoBehaviour:
|
||||
Data: COLOR_YELLOW
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 92|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 95|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: COLOR_YELLOW
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 88
|
||||
Data: 91
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 88
|
||||
Data: 91
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -1487,7 +1541,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 93|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 96|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -1511,16 +1565,16 @@ MonoBehaviour:
|
||||
Data: COLOR_GREEN
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 94|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 97|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: COLOR_GREEN
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 88
|
||||
Data: 91
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 88
|
||||
Data: 91
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -1535,7 +1589,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 95|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 98|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
|
||||
@@ -36,6 +36,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
[UdonSynced] private int _StageIndex = 0;
|
||||
[UdonSynced] private int _CurrentPlayerCounter = 0;
|
||||
[UdonSynced] private string[] _Players = new string[2];
|
||||
[UdonSynced] private bool _RoundIsOver = false;
|
||||
|
||||
private CameraControllerRound2 _CameraControllerRound2 = null;
|
||||
|
||||
@@ -52,7 +53,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
_CameraControllerRound2 = (CameraControllerRound2)_CameraController;
|
||||
if (_CameraControllerRound2 == null)
|
||||
{
|
||||
Debug.LogError("Camera controller is the wrong type. This will cause a crash for sure.");
|
||||
Debug.LogError("[GameManagerRound2] Camera controller is the wrong type. This will cause a crash for sure.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,6 +189,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
private void BeginRound()
|
||||
{
|
||||
_CurrentPlayerCounter = 0;
|
||||
_RoundIsOver = false;
|
||||
|
||||
_Players = _CaseManager.GetCurrentWinningPlayers();
|
||||
if (_Players == null || _Players.Length != 2)
|
||||
@@ -203,7 +205,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
RecoverTheLootInterface.SetLootButton(_LocationBoard.LootLocation);
|
||||
RecoverTheLootInterface.SetWarrantButton(_LocationBoard.WarrantLocation);
|
||||
RecoverTheLootInterface.SetCrookButton(_LocationBoard.CrookLocation);
|
||||
RecoverTheLootInterface.EnableAllPanelButtons(true);
|
||||
RecoverTheLootInterface.ActivateAllPanelButtons(true, true);
|
||||
|
||||
for (int i = 0; i < _Landmarks.Length; i++)
|
||||
{
|
||||
@@ -268,7 +270,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.SetComment("Nothing there.", COLOR_STANDARD);
|
||||
|
||||
Interface.EnableAllPanelButtons(false);
|
||||
Interface.ActivateAllPanelButtons(false);
|
||||
}
|
||||
|
||||
public void AlreadyTried()
|
||||
@@ -277,7 +279,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.SetComment("Already tried that one.", COLOR_STANDARD);
|
||||
|
||||
Interface.EnableAllPanelButtons(false);
|
||||
Interface.ActivateAllPanelButtons(false);
|
||||
}
|
||||
|
||||
public void NiceStrategy()
|
||||
@@ -286,13 +288,14 @@ public class GameManagerRound2 : GameManagerBase
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.SetComment("Nice strategy.", COLOR_GREEN);
|
||||
|
||||
Interface.EnableAllPanelButtons(false);
|
||||
Interface.ActivateAllPanelButtons(false);
|
||||
}
|
||||
|
||||
// This is for when a player wins the game. This should disable all inputs,
|
||||
// and should also enable victory animations.
|
||||
public void YoureWinner()
|
||||
{
|
||||
_RoundIsOver = true;
|
||||
int WinningPlayerNumber = _CurrentPlayerCounter % _Players.Length;
|
||||
string[] Winner = new string[1];
|
||||
Winner[0] = _Players[WinningPlayerNumber];
|
||||
@@ -302,11 +305,13 @@ public class GameManagerRound2 : GameManagerBase
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.SetComment("Winner! Congratulations, " + Winner[0], COLOR_RED);
|
||||
|
||||
Interface.EnableAllPanelButtons(false);
|
||||
Interface.ActivateAllPanelButtons(false);
|
||||
|
||||
_CameraControllerRound2.ActivateLocationBoardAndWinningPlayerCameraSwitcher();
|
||||
_CameraControllerRound2.ActivateHostWinnerCameraTrigger();
|
||||
|
||||
AdvanceRound();
|
||||
|
||||
SendCustomEventDelayedSeconds(nameof(YoureWinnerDelayedFunctions), 1.0f);
|
||||
}
|
||||
public void YoureWinnerDelayedFunctions()
|
||||
@@ -314,7 +319,11 @@ public class GameManagerRound2 : GameManagerBase
|
||||
_PlayerConfettiCannons[_CurrentPlayerCounter % _Players.Length].Play();
|
||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All, "StopMusic");
|
||||
|
||||
AdvanceRound();
|
||||
SendCustomEventDelayedSeconds(nameof(YoureWinnerDelayedFunctions2), 1.0f);
|
||||
}
|
||||
public void YoureWinnerDelayedFunctions2()
|
||||
{
|
||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All, "PlayMusic", MusicEventType.YoureWinner);
|
||||
}
|
||||
|
||||
|
||||
@@ -375,18 +384,53 @@ public class GameManagerRound2 : GameManagerBase
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.SetComment(_Players[_CurrentPlayerCounter % _Players.Length] + ", your turn.", COLOR_STANDARD);
|
||||
SendCustomEventDelayedSeconds(nameof(EnableAllPanelButtons), 0.5f);
|
||||
SendCustomEventDelayedSeconds(nameof(ActivateAllPanelButtons_DelayFunction), 0.5f);
|
||||
}
|
||||
|
||||
RequestSerialization();
|
||||
}
|
||||
public void EnableAllPanelButtons()
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.EnableAllPanelButtons(true);
|
||||
|
||||
SwitchToCurrentPlayerAndLocationBoardSwitcher();
|
||||
public void ActivateAllPanelButtons_DelayFunction()
|
||||
{
|
||||
if (!_RoundIsOver)
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.ActivateAllPanelButtons(true, true);
|
||||
|
||||
SwitchToCurrentPlayerAndLocationBoardSwitcher();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void FoundTheLoot()
|
||||
{
|
||||
_AudioManager.PlaySFX(SFXEventType.TheLoot);
|
||||
SendCustomEventDelayedSeconds(nameof(ActivateAllPanelButtonsExceptTargets_DelayFunction), 1.5f);
|
||||
}
|
||||
|
||||
public void FoundTheWarrant()
|
||||
{
|
||||
_AudioManager.PlaySFX(SFXEventType.TheWarrant);
|
||||
SendCustomEventDelayedSeconds(nameof(ActivateAllPanelButtonsExceptTargets_DelayFunction), 1.5f);
|
||||
}
|
||||
|
||||
public void FoundTheCrook()
|
||||
{
|
||||
_AudioManager.PlayCrookTheme(_CaseManager.GetCrook());
|
||||
SendCustomEventDelayedSeconds(nameof(ActivateAllPanelButtonsExceptTargets_DelayFunction), 1.5f);
|
||||
}
|
||||
|
||||
public void ActivateAllPanelButtonsExceptTargets_DelayFunction()
|
||||
{
|
||||
if (!_RoundIsOver)
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.ActivateAllPanelButtons(true);
|
||||
|
||||
SwitchToCurrentPlayerAndLocationBoardSwitcher();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -396,22 +440,6 @@ public class GameManagerRound2 : GameManagerBase
|
||||
}
|
||||
|
||||
|
||||
public void PlayTheLoot()
|
||||
{
|
||||
_AudioManager.PlaySFX(SFXEventType.TheLoot);
|
||||
}
|
||||
|
||||
public void PlayTheWarrant()
|
||||
{
|
||||
_AudioManager.PlaySFX(SFXEventType.TheWarrant);
|
||||
}
|
||||
|
||||
public void PlayTheCrookTheme()
|
||||
{
|
||||
_AudioManager.PlayCrookTheme(_CaseManager.GetCrook());
|
||||
}
|
||||
|
||||
|
||||
protected override HostCardInterfaceBase GetHostCardInterface(RoundSegmentType Question)
|
||||
{
|
||||
return _HostCard.EnableHostCardDisplay(RoundType.RecoverTheLoot, Question);
|
||||
@@ -446,8 +474,9 @@ public class GameManagerRound2 : GameManagerBase
|
||||
return;
|
||||
}
|
||||
|
||||
((HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot))
|
||||
.DisablePanelButton(Panel);
|
||||
HostCardRecoverTheLootInterface Interface = (HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.ActivateAllPanelButtons(false);
|
||||
Interface.DisablePanelButton(Panel);
|
||||
|
||||
_PanelToReveal_Cache = Panel;
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public class GameManagerRound3 : GameManagerBase
|
||||
_CameraControllerRound3 = (CameraControllerRound3)_CameraController;
|
||||
if (_CameraControllerRound3 == null)
|
||||
{
|
||||
Debug.LogError("Camera controller is the wrong type. This will cause a crash for sure.");
|
||||
Debug.LogError("[GameManagerRound3] Camera controller is the wrong type. This will cause a crash for sure.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user