- Fixed a large number of simple sync issues during round 1.
- Fixed reset issues with round 2.
This commit is contained in:
@@ -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