Lightning round is now mostly implemented.

This commit is contained in:
Jamie Greunbaum
2025-06-04 03:31:43 -04:00
parent 53bdffd427
commit a27223e2b2
42 changed files with 4898 additions and 3939 deletions
-2
View File
@@ -1,5 +1,4 @@
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using TMPro;
using UdonSharp;
using UnityEngine;
@@ -159,6 +158,5 @@ public class ChoiceCardGroup : UdonSharpBehaviour
}
_PCCardAnimator.SetBool("Turn Forward", false);
_PCCardAnimator.Update(1.0f);
}
}
+285 -231
View File
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 19
Data: 20
- Name:
Entry: 7
Data:
@@ -386,13 +386,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _QuestionStage
Data: _LightningRoundQuestionIndex
- Name: $v
Entry: 7
Data: 22|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _QuestionStage
Data: _LightningRoundQuestionIndex
- Name: <UserType>k__BackingField
Entry: 9
Data: 11
@@ -402,126 +402,6 @@ MonoBehaviour:
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 23|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 24|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _QuestionCorrectResponse
- Name: $v
Entry: 7
Data: 25|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _QuestionCorrectResponse
- Name: <UserType>k__BackingField
Entry: 9
Data: 11
- Name: <SystemType>k__BackingField
Entry: 9
Data: 11
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 26|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 27|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: PlayerPodiums
- Name: $v
Entry: 7
Data: 28|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: PlayerPodiums
- Name: <UserType>k__BackingField
Entry: 7
Data: 29|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: PlayerPodium[], Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 30|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Component[], UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
@@ -530,10 +410,10 @@ MonoBehaviour:
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 31|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 23|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@@ -552,18 +432,192 @@ MonoBehaviour:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _QuestionStage
- Name: $v
Entry: 7
Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _QuestionStage
- Name: <UserType>k__BackingField
Entry: 9
Data: 11
- Name: <SystemType>k__BackingField
Entry: 9
Data: 11
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 25|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 26|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _QuestionCorrectResponse
- Name: $v
Entry: 7
Data: 27|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _QuestionCorrectResponse
- Name: <UserType>k__BackingField
Entry: 9
Data: 11
- Name: <SystemType>k__BackingField
Entry: 9
Data: 11
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 28|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 29|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _PlayerPodiums
- Name: $v
Entry: 7
Data: 30|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PlayerPodiums
- Name: <UserType>k__BackingField
Entry: 7
Data: 31|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: PlayerPodium[], Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 32|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Component[], UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 33|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 34|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: QuestionURL
- Name: $v
Entry: 7
Data: 32|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 35|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: QuestionURL
- Name: <UserType>k__BackingField
Entry: 7
Data: 33|System.RuntimeType, mscorlib
Data: 36|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: VRC.SDKBase.VRCUrl, VRCSDKBase
@@ -572,7 +626,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 33
Data: 36
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -587,13 +641,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 34|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 37|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 35|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 38|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@@ -617,13 +671,13 @@ MonoBehaviour:
Data: _PregameInterface
- Name: $v
Entry: 7
Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PregameInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 37|System.RuntimeType, mscorlib
Data: 40|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardPregameInterface, Assembly-CSharp
@@ -632,7 +686,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 38|System.RuntimeType, mscorlib
Data: 41|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: VRC.Udon.UdonBehaviour, VRC.Udon
@@ -653,13 +707,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 39|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 42|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 40|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 43|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@@ -683,13 +737,13 @@ MonoBehaviour:
Data: _MultipleChoiceInterface
- Name: $v
Entry: 7
Data: 41|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 44|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _MultipleChoiceInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 42|System.RuntimeType, mscorlib
Data: 45|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardMultipleChoiceInterface, Assembly-CSharp
@@ -698,7 +752,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 38
Data: 41
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -713,13 +767,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 43|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 46|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 44|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 47|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@@ -743,13 +797,13 @@ MonoBehaviour:
Data: _LightningRoundInterface
- Name: $v
Entry: 7
Data: 45|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 48|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _LightningRoundInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 46|System.RuntimeType, mscorlib
Data: 49|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardLightningRoundInterface, Assembly-CSharp
@@ -758,7 +812,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 38
Data: 41
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -773,13 +827,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 47|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 50|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 48|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 51|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@@ -803,13 +857,13 @@ MonoBehaviour:
Data: _Ding
- Name: $v
Entry: 7
Data: 49|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 52|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Ding
- Name: <UserType>k__BackingField
Entry: 7
Data: 50|System.RuntimeType, mscorlib
Data: 53|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.AudioClip, UnityEngine.AudioModule
@@ -818,7 +872,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 50
Data: 53
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -833,73 +887,19 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 51|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 54|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 52|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
Data: 55|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: Audio
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 53|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _Buzzer
- Name: $v
Entry: 7
Data: 54|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Buzzer
- Name: <UserType>k__BackingField
Entry: 9
Data: 50
- Name: <SystemType>k__BackingField
Entry: 9
Data: 50
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 55|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 56|UnityEngine.SerializeField, UnityEngine.CoreModule
@@ -923,19 +923,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _WhereInTheWorld
Data: _Buzzer
- Name: $v
Entry: 7
Data: 57|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _WhereInTheWorld
Data: _Buzzer
- Name: <UserType>k__BackingField
Entry: 9
Data: 50
Data: 53
- Name: <SystemType>k__BackingField
Entry: 9
Data: 50
Data: 53
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -977,19 +977,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _RockapellaIdent
Data: _WhereInTheWorld
- Name: $v
Entry: 7
Data: 60|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RockapellaIdent
Data: _WhereInTheWorld
- Name: <UserType>k__BackingField
Entry: 9
Data: 50
Data: 53
- Name: <SystemType>k__BackingField
Entry: 9
Data: 50
Data: 53
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -1031,25 +1031,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _MusicPlayer
Data: _RockapellaIdent
- Name: $v
Entry: 7
Data: 63|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _MusicPlayer
Data: _RockapellaIdent
- Name: <UserType>k__BackingField
Entry: 7
Data: 64|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.AudioSource, UnityEngine.AudioModule
- Name:
Entry: 8
Data:
Entry: 9
Data: 53
- Name: <SystemType>k__BackingField
Entry: 9
Data: 64
Data: 53
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -1064,13 +1058,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 65|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 64|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 66|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 65|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@@ -1091,19 +1085,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _SFXPlayer
Data: _MusicPlayer
- Name: $v
Entry: 7
Data: 67|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 66|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SFXPlayer
Data: _MusicPlayer
- Name: <UserType>k__BackingField
Entry: 9
Data: 64
Entry: 7
Data: 67|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.AudioSource, UnityEngine.AudioModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 64
Data: 67
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -1140,6 +1140,60 @@ MonoBehaviour:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _SFXPlayer
- Name: $v
Entry: 7
Data: 70|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SFXPlayer
- Name: <UserType>k__BackingField
Entry: 9
Data: 67
- Name: <SystemType>k__BackingField
Entry: 9
Data: 67
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 71|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 72|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
+146 -41
View File
@@ -46,10 +46,11 @@ public class GameManager : UdonSharpBehaviour
private DataList _QuestionsList = new DataList();
private int _QuestionIndex = 0;
private DataDictionary _CurrentQuestion;
private int _LightningRoundQuestionIndex = 0;
[UdonSynced] private int _QuestionStage = 0;
[UdonSynced] private int _QuestionCorrectResponse = 0;
public PlayerPodium[] PlayerPodiums;
[SerializeField] private PlayerPodium[] _PlayerPodiums;
[UdonSynced] public VRCUrl QuestionURL;
@@ -69,7 +70,7 @@ public class GameManager : UdonSharpBehaviour
void Start()
{
_PlayerBuzzInAllowed = new bool[PlayerPodiums.Length];
_PlayerBuzzInAllowed = new bool[_PlayerPodiums.Length];
ResetBuzzers();
// Download our test question.
@@ -111,9 +112,10 @@ public class GameManager : UdonSharpBehaviour
}
}
private void NewMultipleChoiceQuestion()
{
_MultipleChoiceInterface.HeaderUI.text = _CurrentQuestion["Type"].Number.ToString();
_MultipleChoiceInterface.HeaderUI.text = "Multiple Choice";
DataList ClueStrings = _CurrentQuestion["Clues"].DataList;
for (int i = 0; i < _MultipleChoiceInterface.CluesUI.Length && i < ClueStrings.Count; i++)
@@ -122,9 +124,10 @@ public class GameManager : UdonSharpBehaviour
}
DataList Choices = _CurrentQuestion["Choices"].DataList;
_MultipleChoiceInterface.ChoiceUI[0].text = Choices[0].ToString();
_MultipleChoiceInterface.ChoiceUI[1].text = Choices[1].ToString();
_MultipleChoiceInterface.ChoiceUI[2].text = Choices[2].ToString();
for (int i = 0; i < Choices.Count && i < _MultipleChoiceInterface.ChoiceUI.Length; i++)
{
_MultipleChoiceInterface.ChoiceUI[i].text = Choices[i].ToString();
}
_QuestionCorrectResponse = (int)_CurrentQuestion["Correct Response"].Number;
@@ -141,7 +144,7 @@ public class GameManager : UdonSharpBehaviour
}
public void MultipleChoiceRevealChoice1()
{
_MultipleChoiceInterface.ChoiceButtons[0].color = (_QuestionCorrectResponse == 1) ? Color.green : Color.red;
_MultipleChoiceInterface.ChoiceButtonImages[0].color = (_QuestionCorrectResponse == 1) ? Color.green : Color.red;
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, As5);
@@ -149,7 +152,7 @@ public class GameManager : UdonSharpBehaviour
}
public void MultipleChoiceRevealChoice2()
{
_MultipleChoiceInterface.ChoiceButtons[1].color = (_QuestionCorrectResponse == 2) ? Color.green : Color.red;
_MultipleChoiceInterface.ChoiceButtonImages[1].color = (_QuestionCorrectResponse == 2) ? Color.green : Color.red;
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, C6);
@@ -157,11 +160,11 @@ public class GameManager : UdonSharpBehaviour
}
public void MultipleChoiceRevealChoice3()
{
_MultipleChoiceInterface.ChoiceButtons[2].color = (_QuestionCorrectResponse == 3) ? Color.green : Color.red;
_MultipleChoiceInterface.ChoiceButtonImages[2].color = (_QuestionCorrectResponse == 3) ? Color.green : Color.red;
DataList Choices = _CurrentQuestion["Choices"].DataList;
EnableChoiceCards();
for (int i = 0; i < PlayerPodiums.Length; i++)
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
int[] Indices = { 0, 1, 2 };
int[] ChoiceOrder = { -1, -1, -1 };
@@ -181,7 +184,7 @@ public class GameManager : UdonSharpBehaviour
Indices[Choice3Index] = -1;
string[] ChoiceStrings = { Choices[0].ToString(), Choices[1].ToString(), Choices[2].ToString() };
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)PlayerPodiums[i], NetworkEventTarget.All, "SetCardChoices", ChoiceStrings, ChoiceOrder);
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "SetCardChoices", ChoiceStrings, ChoiceOrder);
}
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, D6);
@@ -191,9 +194,9 @@ public class GameManager : UdonSharpBehaviour
private void MultipleChoiceLockAnswers()
{
for (int i = 0; i < PlayerPodiums.Length; i++)
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)PlayerPodiums[i], NetworkEventTarget.All, "LockInChoice");
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "LockInChoice");
}
_MultipleChoiceInterface.HeaderUI.text = "LOCKED IN";
@@ -217,28 +220,99 @@ public class GameManager : UdonSharpBehaviour
{
_MultipleChoiceInterface.HeaderUI.text = "ANSWER REVEALED";
for (int i = 0; i < PlayerPodiums.Length; i++)
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)PlayerPodiums[i], NetworkEventTarget.All, "VerifyResponse", _QuestionCorrectResponse);
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "VerifyResponse", _QuestionCorrectResponse);
}
EnableInteraction("Next Question");
}
private void BeginLightningRound()
{
_LightningRoundQuestionIndex = 0;
_LightningRoundInterface.HeaderUI.text = "Lightning Round | " + _CurrentQuestion["Location"].ToString();
EnableHostCardDisplay(QuestionType.LightningRound);
EnableBuzzers();
EnableInteraction("Next Question");
}
private void NewLightningRoundQuestion(int Question)
{
_LightningRoundQuestionIndex = Question;
DataDictionary CurrentQuestion = _CurrentQuestion["Questions"].DataList[Question - 1].DataDictionary;
_LightningRoundInterface.QuestionUI.text = CurrentQuestion["Question"].ToString();
DataList Choices = CurrentQuestion["Choices"].DataList;
for (int i = 0; i < Choices.Count && i < _LightningRoundInterface.ChoiceUI.Length; i++)
{
_LightningRoundInterface.ChoiceUI[i].text = Choices[i].ToString();
}
_QuestionCorrectResponse = (int)CurrentQuestion["Correct Response"].Number;
for (int i = 0; i < _LightningRoundInterface.ChoiceButtons.Length && i < _LightningRoundInterface.ChoiceButtonImages.Length; i++)
{
_LightningRoundInterface.ChoiceButtonImages[i].color = (_QuestionCorrectResponse == (i + 1)) ? Color.green : Color.red;
_LightningRoundInterface.ChoiceButtons[i].interactable = true;
}
EnableBuzzInPeriodForAllPlayers();
}
private void LightningRoundCheckAnswer(int Answer)
{
if (_BuzzedInPlayer > 0 && _QuestionCorrectResponse == Answer)
{
for (int i = 0; i < _LightningRoundInterface.ChoiceButtons.Length; i++)
{
_LightningRoundInterface.ChoiceButtons[i].interactable = false;
}
_PlayerPodiums[_BuzzedInPlayer - 1].IncreaseScoreBy5();
EndBuzzInPeriod();
EnableInteraction("Next Question");
}
else
{
WaitForBuzzInsWithoutLastPlayer();
}
}
public void LightningRoundCheckAnswer1()
{
LightningRoundCheckAnswer(1);
}
public void LightningRoundCheckAnswer2()
{
LightningRoundCheckAnswer(2);
}
public void LightningRoundCheckAnswer3()
{
LightningRoundCheckAnswer(3);
}
private void AdvanceToNextQuestion()
{
DisableChoiceCards();
DisableBuzzers();
_QuestionIndex++;
if (_QuestionIndex >= _QuestionsList.Count)
{
Debug.LogError("No more questions.");
_PregameInterface.HeaderUI.text = "No More Questions";
EnableHostCardDisplay(QuestionType.None);
DisableInteraction();
return;
}
_CurrentQuestion = _QuestionsList[_QuestionIndex].DataDictionary;
_QuestionCorrectResponse = (int)_CurrentQuestion["Correct Response"].Number;
_QuestionStage = 0;
ResetInfoCard();
@@ -255,9 +329,9 @@ public class GameManager : UdonSharpBehaviour
_MultipleChoiceInterface.CluesUI[i].text = "";
}
for (int i = 0; i < _MultipleChoiceInterface.ChoiceButtons.Length; i++)
for (int i = 0; i < _MultipleChoiceInterface.ChoiceButtonImages.Length; i++)
{
_MultipleChoiceInterface.ChoiceButtons[i].color = Color.white;
_MultipleChoiceInterface.ChoiceButtonImages[i].color = Color.white;
}
for (int i = 0; i < _MultipleChoiceInterface.ChoiceUI.Length; i++)
@@ -269,27 +343,53 @@ public class GameManager : UdonSharpBehaviour
private void EnableChoiceCards()
{
for (int i = 0; i < PlayerPodiums.Length; i++)
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)PlayerPodiums[i], NetworkEventTarget.All, "EnableChoiceCards", true);
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "EnableChoiceCards", true);
}
}
private void DisableChoiceCards()
{
for (int i = 0; i < PlayerPodiums.Length; i++)
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)PlayerPodiums[i], NetworkEventTarget.All, "EnableChoiceCards", false);
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "EnableChoiceCards", false);
}
}
public void EnableBuzzers()
{
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "EnableBuzzer", true);
}
}
public void DisableBuzzers()
{
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "EnableBuzzer", false);
}
}
public void EnableBuzzInPeriodForAllPlayers()
{
_BuzzInAllowed = true;
ResetBuzzers();
}
public void WaitForBuzzInsWithoutLastPlayer() {
_BuzzInAllowed = true;
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)_PlayerPodiums[_BuzzedInPlayer - 1],
NetworkEventTarget.All,
"EnableBuzzInEffect", false);
_BuzzedInPlayer = -1;
RequestSerialization();
}
[NetworkCallable]
public void PlayerBuzzedIn(int PlayerNumber)
{
@@ -303,7 +403,7 @@ public class GameManager : UdonSharpBehaviour
RequestSerialization();
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)PlayerPodiums[PlayerIndex],
(IUdonEventReceiver)_PlayerPodiums[PlayerIndex],
NetworkEventTarget.All,
"EnableBuzzInEffect", true);
@@ -311,16 +411,6 @@ public class GameManager : UdonSharpBehaviour
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFX), SFXEventType.Buzzer);
}
public void WaitForBuzzInsWithoutLastPlayer() {
_BuzzInAllowed = true;
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)PlayerPodiums[_BuzzedInPlayer - 1],
NetworkEventTarget.All,
"EnableBuzzInEffect", false);
_BuzzedInPlayer = -1;
RequestSerialization();
}
public void EndBuzzInPeriod()
{
_BuzzInAllowed = false;
@@ -329,7 +419,10 @@ public class GameManager : UdonSharpBehaviour
public void ResetBuzzers()
{
for (int i = 0; i < PlayerPodiums.Length; i++) { _PlayerBuzzInAllowed[i] = true; }
for (int i = 0; i < _PlayerPodiums.Length; i++) {
_PlayerBuzzInAllowed[i] = true;
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "EnableBuzzInEffect", false);
}
_BuzzedInPlayer = -1;
}
@@ -345,12 +438,11 @@ public class GameManager : UdonSharpBehaviour
// to an enum in a switch parameter, but not if you cast an enum to an int in a case
// statement. I'm starting to wonder if either C# or U# are just fucking terrible
// languages. C++ figured this problem out in at least 1985, and it turns out the proper
// solution was "it's not a problem, it's just two numbers, they're the same".
switch (_CurrentQuestion["Type"].Number)
// solution was "it's not a problem, it's two numbers, they're the same fucking thing".
switch ((int)_CurrentQuestion["Type"].Number)
{
case (int)QuestionType.MultipleChoice:
AdvanceMultipleChoiceStage();
break;
case (int)QuestionType.MultipleChoice: AdvanceMultipleChoiceStage(); break;
case (int)QuestionType.LightningRound: AdvanceLightningRoundQuestion(); break;
}
RequestSerialization();
@@ -367,7 +459,20 @@ public class GameManager : UdonSharpBehaviour
case 5: MultipleChoiceLockAnswers(); break;
case 6: MultipleChoiceRevealAnswersAndAssignPoints(); break;
case 7: AdvanceToNextQuestion(); break;
default: return;
default: break;
}
}
private void AdvanceLightningRoundQuestion()
{
switch(_QuestionStage)
{
case 1: BeginLightningRound(); break;
case 2: NewLightningRoundQuestion(1); break;
case 3: NewLightningRoundQuestion(2); break;
case 4: NewLightningRoundQuestion(3); break;
case 5: AdvanceToNextQuestion(); break;
default: break;
}
}
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 3
Data: 4
- Name:
Entry: 7
Data:
@@ -158,13 +158,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: ChoiceButtons
Data: ChoiceButtonImages
- Name: $v
Entry: 7
Data: 8|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ChoiceButtons
Data: ChoiceButtonImages
- Name: <UserType>k__BackingField
Entry: 7
Data: 9|System.RuntimeType, mscorlib
@@ -207,6 +207,60 @@ MonoBehaviour:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: ChoiceButtons
- Name: $v
Entry: 7
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ChoiceButtons
- Name: <UserType>k__BackingField
Entry: 7
Data: 12|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.UI.Button[], UnityEngine.UI
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 12
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 13|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
@@ -11,5 +11,6 @@ public class HostCardInterfaceBase : UdonSharpBehaviour
public TextMeshProUGUI HeaderUI;
public TextMeshProUGUI[] ChoiceUI;
public Image[] ChoiceButtons;
public Image[] ChoiceButtonImages;
public Button[] ChoiceButtons;
}
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 4
Data: 5
- Name:
Entry: 7
Data:
@@ -158,13 +158,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: ChoiceButtons
Data: ChoiceButtonImages
- Name: $v
Entry: 7
Data: 8|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ChoiceButtons
Data: ChoiceButtonImages
- Name: <UserType>k__BackingField
Entry: 7
Data: 9|System.RuntimeType, mscorlib
@@ -212,13 +212,67 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: ClueUI
Data: ChoiceButtons
- Name: $v
Entry: 7
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ClueUI
Data: ChoiceButtons
- Name: <UserType>k__BackingField
Entry: 7
Data: 12|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.UI.Button[], UnityEngine.UI
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 12
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 13|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: QuestionUI
- Name: $v
Entry: 7
Data: 14|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: QuestionUI
- Name: <UserType>k__BackingField
Entry: 9
Data: 3
@@ -239,7 +293,7 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 12|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@@ -9,5 +9,5 @@ using VRC.Udon;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class HostCardLightningRoundInterface : HostCardInterfaceBase
{
public TextMeshProUGUI ClueUI;
public TextMeshProUGUI QuestionUI;
}
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 4
Data: 5
- Name:
Entry: 7
Data:
@@ -158,13 +158,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: ChoiceButtons
Data: ChoiceButtonImages
- Name: $v
Entry: 7
Data: 8|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ChoiceButtons
Data: ChoiceButtonImages
- Name: <UserType>k__BackingField
Entry: 7
Data: 9|System.RuntimeType, mscorlib
@@ -212,10 +212,64 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: CluesUI
Data: ChoiceButtons
- Name: $v
Entry: 7
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ChoiceButtons
- Name: <UserType>k__BackingField
Entry: 7
Data: 12|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.UI.Button[], UnityEngine.UI
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 12
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 13|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: CluesUI
- Name: $v
Entry: 7
Data: 14|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: CluesUI
@@ -239,7 +293,7 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 12|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 3
Data: 4
- Name:
Entry: 7
Data:
@@ -158,13 +158,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: ChoiceButtons
Data: ChoiceButtonImages
- Name: $v
Entry: 7
Data: 8|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ChoiceButtons
Data: ChoiceButtonImages
- Name: <UserType>k__BackingField
Entry: 7
Data: 9|System.RuntimeType, mscorlib
@@ -207,6 +207,60 @@ MonoBehaviour:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: ChoiceButtons
- Name: $v
Entry: 7
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ChoiceButtons
- Name: <UserType>k__BackingField
Entry: 7
Data: 12|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.UI.Button[], UnityEngine.UI
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 12
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 13|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
+91 -31
View File
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 9
Data: 10
- Name:
Entry: 7
Data:
@@ -404,25 +404,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _BuzzedInEffect
Data: _Buzzer
- Name: $v
Entry: 7
Data: 25|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _BuzzedInEffect
Data: _Buzzer
- Name: <UserType>k__BackingField
Entry: 7
Data: 26|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.GameObject, UnityEngine.CoreModule
Data: Buzzer, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 26
Data: 7
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -440,19 +440,10 @@ MonoBehaviour:
Data: 27|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
Data: 1
- Name:
Entry: 7
Data: 28|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: Effects
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 29|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 28|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@@ -473,25 +464,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _Nameplate
Data: _BuzzedInEffect
- Name: $v
Entry: 7
Data: 30|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 29|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Nameplate
Data: _BuzzedInEffect
- Name: <UserType>k__BackingField
Entry: 7
Data: 31|System.RuntimeType, mscorlib
Data: 30|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
Data: UnityEngine.GameObject, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 31
Data: 30
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -506,10 +497,19 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 32|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 31|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
Data: 2
- Name:
Entry: 7
Data: 32|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: Effects
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 33|UnityEngine.SerializeField, UnityEngine.CoreModule
@@ -533,19 +533,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _Scorecard
Data: _Nameplate
- Name: $v
Entry: 7
Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Scorecard
Data: _Nameplate
- Name: <UserType>k__BackingField
Entry: 9
Data: 31
Entry: 7
Data: 35|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 31
Data: 35
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -560,13 +566,67 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 35|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 36|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 36|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 37|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _Scorecard
- Name: $v
Entry: 7
Data: 38|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Scorecard
- Name: <UserType>k__BackingField
Entry: 9
Data: 35
- Name: <SystemType>k__BackingField
Entry: 9
Data: 35
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 39|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 40|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
+9
View File
@@ -18,6 +18,7 @@ public class PlayerPodium : UdonSharpBehaviour
[UdonSynced, FieldChangeCallback(nameof(PlayerScore))] private int _PlayerScore = 50;
[SerializeField] private ChoiceCardGroup _ChoiceCards;
[SerializeField] private Buzzer _Buzzer;
[Header("Effects")]
[SerializeField] private GameObject _BuzzedInEffect;
@@ -34,6 +35,7 @@ public class PlayerPodium : UdonSharpBehaviour
public void SetPlayerName()
{
Debug.LogWarning("Player name is being set here");
if (_PlayerID != -1) { return; }
Networking.SetOwner(Networking.LocalPlayer, gameObject);
PlayerName = Networking.LocalPlayer.displayName;
@@ -90,6 +92,13 @@ public class PlayerPodium : UdonSharpBehaviour
}
[NetworkCallable]
public void EnableBuzzer(bool Enable)
{
_Buzzer.gameObject.SetActive(Enable);
}
[NetworkCallable]
public void EnableBuzzInEffect(bool Enable)
{