- Fixed a large number of simple sync issues during round 1.
- Fixed reset issues with round 2.
This commit is contained in:
@@ -130,8 +130,6 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
|
||||
public override void OnVideoStart()
|
||||
{
|
||||
Debug.LogError("Displaying video material...");
|
||||
|
||||
ShowScreen = ClueScreenType.Video;
|
||||
UpdateTimeAndOffset();
|
||||
|
||||
@@ -143,7 +141,6 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
if (Networking.IsOwner(gameObject))
|
||||
{
|
||||
TimeAndOffset = new Vector2(_VideoPlayer.GetTime(), (float)Networking.GetServerTimeInSeconds());
|
||||
RequestSerialization();
|
||||
|
||||
if (SyncFrequency > 0.0f)
|
||||
{
|
||||
@@ -152,8 +149,10 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
SendCustomEvent(nameof(Resync));
|
||||
Resync();
|
||||
}
|
||||
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
public void Resync()
|
||||
@@ -252,7 +251,7 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
_TimeAndOffset = value;
|
||||
if (!Networking.IsOwner(gameObject))
|
||||
{
|
||||
SendCustomEvent(nameof(Resync));
|
||||
Resync();
|
||||
}
|
||||
}
|
||||
get => _TimeAndOffset;
|
||||
|
||||
@@ -111,7 +111,7 @@ public class CaseManager : UdonSharpBehaviour
|
||||
ErrorString = "Ensure the 'Round 3' dictionary entry is a dictionary with a key called 'Continent' and an integer value.";
|
||||
}
|
||||
|
||||
ContinueToRound3();
|
||||
ContinueToRound1();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -439,7 +439,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
int PodiumIndex = _BuzzedInPlayer - 1;
|
||||
if (PodiumIndex >= 0 && PodiumIndex < _PlayerPodiums.Length)
|
||||
{
|
||||
_PlayerPodiums[PodiumIndex].AdjustScore(5);
|
||||
_PlayerPodiums[PodiumIndex].SendCustomNetworkEvent(NetworkEventTarget.Owner,
|
||||
"AdjustScore", 5);
|
||||
}
|
||||
|
||||
EndBuzzInPeriod();
|
||||
@@ -536,7 +537,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
int PodiumIndex = _BuzzedInPlayer - 1;
|
||||
if (PodiumIndex >= 0 && PodiumIndex < _PlayerPodiums.Length)
|
||||
{
|
||||
_PlayerPodiums[PodiumIndex].AdjustScore(5);
|
||||
_PlayerPodiums[PodiumIndex].SendCustomNetworkEvent(NetworkEventTarget.Owner,
|
||||
"AdjustScore", 5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1026,7 +1028,8 @@ public class GameManagerRound1 : GameManagerBase
|
||||
int PodiumIndex = _BuzzedInPlayer - 1;
|
||||
if (PodiumIndex >= 0 && PodiumIndex < _PlayerPodiums.Length)
|
||||
{
|
||||
_PlayerPodiums[PodiumIndex].AdjustScore(5);
|
||||
_PlayerPodiums[PodiumIndex].SendCustomNetworkEvent(NetworkEventTarget.Owner,
|
||||
"AdjustScore", 5);
|
||||
}
|
||||
|
||||
_BuzzedInPlayer = -1;
|
||||
|
||||
@@ -33,6 +33,12 @@ public class GameManagerRound2 : GameManagerBase
|
||||
{
|
||||
_StageIndex = 0;
|
||||
|
||||
LocationBoardReset();
|
||||
|
||||
// Make sure we have the correct interface up after the last function.
|
||||
HostCardBetweenRoundsInterface Interface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||
|
||||
base.InitialiseGameMode();
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ public class PlayerPodium : UdonSharpBehaviour
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
[NetworkCallable]
|
||||
public void AdjustScore(int Adjustment)
|
||||
{
|
||||
PlayerScore += Adjustment;
|
||||
@@ -141,7 +142,7 @@ public class PlayerPodium : UdonSharpBehaviour
|
||||
bool IsCorrectResponse = _ChoiceCards.GetSelectedChoice() == CorrectResponse;
|
||||
if (IsCorrectResponse)
|
||||
{
|
||||
AdjustScore(10);
|
||||
SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(AdjustScore), 10);
|
||||
}
|
||||
|
||||
return IsCorrectResponse;
|
||||
@@ -174,11 +175,11 @@ public class PlayerPodium : UdonSharpBehaviour
|
||||
{
|
||||
if (_ChoiceCards.GetSelectedChoice() == CorrectResponse)
|
||||
{
|
||||
AdjustScore(_RiskCards.GetSelectedChoice());
|
||||
SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(AdjustScore), _RiskCards.GetSelectedChoice());
|
||||
}
|
||||
else
|
||||
{
|
||||
AdjustScore(-_RiskCards.GetSelectedChoice());
|
||||
SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(AdjustScore), -_RiskCards.GetSelectedChoice());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user