- Fixed a large number of simple sync issues during round 1.

- Fixed reset issues with round 2.
This commit is contained in:
2025-07-16 04:37:58 -04:00
parent 3f858ed7d2
commit 757f42a8ea
6 changed files with 22 additions and 13 deletions
+4 -3
View File
@@ -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());
}
}