- Added correct and incorrect buzzers during multiple choice rounds.

- Fixed sync issues with map displays.
- Fixed sync issues with podium ownership changes after a reset.
This commit is contained in:
2025-07-11 03:02:28 -04:00
parent 1bb921d8ed
commit 6de4cef1aa
25 changed files with 795 additions and 463 deletions
+10 -13
View File
@@ -5,7 +5,6 @@ using TMPro;
using VRC.SDKBase;
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
using VRC.Udon.Common;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
@@ -60,13 +59,10 @@ public class PlayerPodium : UdonSharpBehaviour
[NetworkCallable]
public void ResetOwner()
{
Networking.SetOwner(Networking.InstanceOwner, gameObject);
Networking.SetOwner(Networking.InstanceOwner, _ChoiceCards.gameObject);
Networking.SetOwner(Networking.InstanceOwner, _RiskCards.gameObject);
Networking.SetOwner(Networking.InstanceOwner, _Buzzer.gameObject);
PlayerName = "Player " + PlayerNumber;
_PlayerID = -1;
RequestSerialization();
}
public int GetPlayerID() { return _PlayerID; }
@@ -94,22 +90,22 @@ public class PlayerPodium : UdonSharpBehaviour
}
[NetworkCallable]
public void DecreaseScoreBy5()
{
PlayerScore -= 5;
RequestSerialization();
}
[NetworkCallable]
public void IncreaseScoreBy5()
{
PlayerScore += 5;
RequestSerialization();
}
[NetworkCallable]
public void AdjustScore(int Adjustment)
{
PlayerScore += Adjustment;
RequestSerialization();
}
@@ -140,13 +136,15 @@ public class PlayerPodium : UdonSharpBehaviour
"MakeChoiceTextVisible");
}
[NetworkCallable]
public void VerifyMultipleChoiceResponse(int CorrectResponse)
public bool VerifyMultipleChoiceResponse(int CorrectResponse)
{
if (_ChoiceCards.GetSelectedChoice() == CorrectResponse)
bool IsCorrectResponse = _ChoiceCards.GetSelectedChoice() == CorrectResponse;
if (IsCorrectResponse)
{
AdjustScore(10);
}
return IsCorrectResponse;
}
@@ -217,7 +215,6 @@ public class PlayerPodium : UdonSharpBehaviour
{
_PlayerScore = value;
_ScorecardUI.text = PlayerScore.ToString();
RequestSerialization();
}
get => _PlayerScore;
}