Cleaned up the way many custom network event calls were written.

This commit is contained in:
2025-08-05 04:53:12 -04:00
parent 1841c72eaf
commit 8c8111828f
4 changed files with 141 additions and 97 deletions
+4 -16
View File
@@ -115,10 +115,7 @@ public class PlayerPodium : UdonSharpBehaviour
{
_ChoiceCards.gameObject.SetActive(Enable);
_ChoiceCards.ResetCards();
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)_ChoiceCards,
NetworkEventTarget.Owner,
"MakeChoiceTextVisible");
_ChoiceCards.SendCustomNetworkEvent(NetworkEventTarget.Owner, "MakeChoiceTextVisible");
}
[NetworkCallable]
@@ -131,10 +128,7 @@ public class PlayerPodium : UdonSharpBehaviour
public void LockInChoice()
{
_ChoiceCards.LockInChoice();
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)_ChoiceCards,
NetworkEventTarget.All,
"MakeChoiceTextVisible");
_ChoiceCards.SendCustomNetworkEvent(NetworkEventTarget.All, "MakeChoiceTextVisible");
}
public bool VerifyMultipleChoiceResponse(int CorrectResponse)
@@ -154,20 +148,14 @@ public class PlayerPodium : UdonSharpBehaviour
{
_RiskCards.gameObject.SetActive(Enable);
_RiskCards.ResetCards();
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)_RiskCards,
NetworkEventTarget.Owner,
"MakeRiskTextVisible");
_RiskCards.SendCustomNetworkEvent(NetworkEventTarget.Owner, "MakeRiskTextVisible");
}
[NetworkCallable]
public void LockInRisk()
{
_RiskCards.LockInChoice();
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)_RiskCards,
NetworkEventTarget.All,
"MakeRiskTextVisible");
_RiskCards.SendCustomNetworkEvent(NetworkEventTarget.All, "MakeRiskTextVisible");
}
[NetworkCallable]