Refactor went pretty well. Everything is much nicer now.

This commit is contained in:
Jamie Greunbaum 2025-06-12 04:41:33 -04:00
parent a6a0fc807a
commit 7ce8b1693d
20 changed files with 2025 additions and 1262 deletions

View File

@ -66,20 +66,22 @@
<Compile Include="Assets\UdonSharp\HostCardInterfaces\HostCardMultipleChoiceInterface.cs" />
<Compile Include="Assets\UdonSharp\UtilityScripts\InteractToggle.cs" />
<Compile Include="Assets\UdonSharp\Podium\Buzzer.cs" />
<Compile Include="Assets\UdonSharp\GameManagerRound1.cs" />
<Compile Include="Assets\UdonSharp\HostCardInterfaces\HostCardBetweenRoundsInterface.cs" />
<Compile Include="Assets\UdonSharp\PlayerPermissions\PermissionsPanelPlayerEntry.cs" />
<Compile Include="Assets\UdonSharp\Podium\ChoiceCardGroup.cs" />
<Compile Include="Assets\UdonSharp\HostCardInterfaces\HostCardInterfaceBase.cs" />
<Compile Include="Assets\UdonSharp\HostCardInterfaces\HostCardManager.cs" />
<Compile Include="Assets\UdonSharp\GameManager.cs" />
<Compile Include="Assets\UdonSharp\UtilityScripts\Synced\MasterToggleObject.cs" />
<Compile Include="Assets\UdonSharp\PlayerPermissions\HostPanelInterface.cs" />
<Compile Include="Assets\UdonSharp\UtilityScripts\PlayerModSetter.cs" />
<Compile Include="Assets\UdonSharp\GameManagerBase.cs" />
<Compile Include="Assets\VRChatCameraSystem\Ottpossum\Camera System\Scripts\CameraLightSystemManager.cs" />
<Compile Include="Assets\UdonSharp\Podium\PlayerPodium.cs" />
<Compile Include="Assets\UdonSharp\UtilityScripts\BoneFollower.cs" />
<Compile Include="Assets\UdonSharp\CameraAutoLevel.cs" />
<Compile Include="Assets\UdonSharp\Podium\RiskCardGroup.cs" />
<Compile Include="Assets\UdonSharp\GameManagementRegion.cs" />
<Compile Include="Assets\UdonSharp\UtilityScripts\TrackingDataFollower.cs" />
<Compile Include="Assets\VRChatCameraSystem\Ottpossum\Camera System\Scripts\EventCameraSystem.cs" />
<Compile Include="Assets\UdonSharp\HostCardInterfaces\HostCardFinalRoundInterface.cs" />

View File

@ -19,7 +19,7 @@ AudioImporter:
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 0.14999999
quality: 0.25
conversionMode: 0
preloadAudioData: 1
7:
@ -28,7 +28,7 @@ AudioImporter:
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 0.14999999
quality: 0.25
conversionMode: 0
preloadAudioData: 1
forceToMono: 1

View File

@ -19,7 +19,7 @@ AudioImporter:
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 0.14999999
quality: 0.25
conversionMode: 0
preloadAudioData: 1
7:
@ -28,7 +28,7 @@ AudioImporter:
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 0.14999999
quality: 0.25
conversionMode: 0
preloadAudioData: 1
forceToMono: 1

View File

@ -1,9 +1,5 @@
fileFormatVersion: 2
<<<<<<<< HEAD:Assets/Audio/Music/I Feel Good.wav.meta
guid: 680142b640a682d4a92c9935828c2311
========
guid: 68d48e4c48967bf4ca3491c98a2d8c7f
>>>>>>>> final-round:Assets/Audio/SFX/Final Round - Correct.ogg.meta
AudioImporter:
externalObjects: {}
serializedVersion: 7
@ -11,7 +7,7 @@ AudioImporter:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
sampleRateOverride: 0
compressionFormat: 1
quality: 0.7
conversionMode: 0
@ -21,18 +17,18 @@ AudioImporter:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
sampleRateOverride: 0
compressionFormat: 1
quality: 0.14999999
quality: 0.25
conversionMode: 0
preloadAudioData: 1
7:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
sampleRateOverride: 0
compressionFormat: 1
quality: 0.14999999
quality: 0.25
conversionMode: 0
preloadAudioData: 1
forceToMono: 1

View File

@ -19,7 +19,7 @@ AudioImporter:
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 0.14999999
quality: 0.25
conversionMode: 0
preloadAudioData: 1
7:
@ -28,7 +28,7 @@ AudioImporter:
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 0.14999999
quality: 0.25
conversionMode: 0
preloadAudioData: 1
forceToMono: 1

View File

@ -9,13 +9,31 @@ AudioImporter:
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
quality: 0.7
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
preloadAudioData: 1
platformSettingOverrides:
4:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 0.25
conversionMode: 0
preloadAudioData: 1
7:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 0.25
conversionMode: 0
preloadAudioData: 1
forceToMono: 1
normalize: 1
loadInBackground: 0
loadInBackground: 1
ambisonic: 0
3D: 1
userData:

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,233 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: GameManagerBase
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: aa097bd5d9294a14cab8d8fdce153342,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: e4b93753856e7ca48877947cbe074749, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 0
hasInteractEvent: 0
scriptID: -4259654259815039154
serializationData:
SerializedFormat: 2
SerializedBytes:
ReferencedUnityObjects: []
SerializedBytesString:
Prefab: {fileID: 0}
PrefabModificationsReferencedUnityObjects: []
PrefabModifications: []
SerializationNodes:
- Name: fieldDefinitions
Entry: 7
Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition,
UdonSharp.Editor]], mscorlib
- Name: comparer
Entry: 7
Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String,
mscorlib]], mscorlib
- Name:
Entry: 8
Data:
- Name:
Entry: 12
Data: 3
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _HostCard
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _HostCard
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardManager, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 4|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: VRC.Udon.UdonBehaviour, VRC.Udon
- 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: 5|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 6|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: 7|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _QuestionURL
- Name: <UserType>k__BackingField
Entry: 7
Data: 8|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: VRC.SDKBase.VRCUrl, VRCSDKBase
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 8
- 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: 9|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 10|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: _AllowInteractionFromHostCard
- Name: $v
Entry: 7
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _AllowInteractionFromHostCard
- Name: <UserType>k__BackingField
Entry: 7
Data: 12|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean, mscorlib
- 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: false
- 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:
- Name:
Entry: 8
Data:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 58f4439ac4c3e9c438e2513925202b8c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,113 @@

using UdonSharp;
using UnityEngine;
using VRC.SDK3.Data;
using VRC.SDK3.StringLoading;
using VRC.SDK3.UdonNetworkCalling;
using VRC.SDKBase;
using VRC.Udon.Common.Interfaces;
public enum QuestionType
{
BetweenRounds,
MultipleChoice,
LightningRound,
DumpsterDive,
TheChase,
FinalRound,
Tiebreaker
}
public enum MusicEventType
{
None,
TheChase,
ThinkAboutIt,
WhereInTheWorld,
RockapellaIdent
}
public enum SFXEventType
{
None,
Ding,
Buzzer
}
public class GameManagerBase : UdonSharpBehaviour
{
[SerializeField] protected HostCardManager _HostCard = null;
[SerializeField] protected VRCUrl _QuestionURL;
private bool _AllowInteractionFromHostCard = false;
void Start()
{
InitialiseGameMode();
}
protected void EnableInteraction(string NextInteraction = "Advance")
{
_AllowInteractionFromHostCard = true;
_HostCard.SetNextInteractionText(NextInteraction);
}
protected void DisableInteraction()
{
_AllowInteractionFromHostCard = false;
}
public bool IsInteractionEnabled()
{
return _AllowInteractionFromHostCard;
}
public void HostCardUseButtonDown()
{
if (!IsInteractionEnabled()) { return; }
_HostCardUseButtonDown_Internal();
}
protected HostCardInterfaceBase GetHostCardInterface(QuestionType Type)
{
return _HostCard.EnableHostCardDisplay(Type);
}
protected virtual void _HostCardUseButtonDown_Internal()
{
Debug.LogError("You should not be seeing this. You don't need to call base._HostCardUseButtonDown_Internal()");
}
protected virtual void InitialiseGameMode()
{
// Download our test question.
VRCStringDownloader.LoadUrl(_QuestionURL, (IUdonEventReceiver)this);
}
public override void OnStringLoadSuccess(IVRCStringDownload DownloadedString)
{
string JSONString = DownloadedString.Result;
if (VRCJson.TryDeserializeFromJson(JSONString, out DataToken JSONResult))
{
if (JSONResult.TokenType == TokenType.DataList)
{
// For the moment, we're assuming that only Round 1 exists, so just pass
// the data over under that assumption. This will need to be fixed once
// we start expecting more game modes.
LoadQuestionData(JSONResult.DataList);
}
else
{
Debug.LogError("Malformed case file. Ensure the first element is an array of objects.");
}
}
}
protected virtual void LoadQuestionData(DataList Data) {}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e4b93753856e7ca48877947cbe074749
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5,46 +5,11 @@ using VRC.SDK3.Data;
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
using VRC.SDKBase;
using VRC.SDK3.StringLoading;
using VRC.SDK3.Components;
using VRC.Udon.Common;
public enum QuestionType
{
None,
MultipleChoice,
LightningRound,
DumpsterDive,
TheChase,
FinalRound,
Tiebreaker
}
public enum MusicEventType
{
None,
TheChase,
ThinkAboutIt,
WhereInTheWorld,
RockapellaIdent
}
public enum SFXEventType
{
None,
Ding,
Buzzer
}
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class GameManager : UdonSharpBehaviour
public class GameManagerRound1 : GameManagerBase
{
[UdonSynced] private bool _BuzzInAllowed = false;
[UdonSynced] private bool[] _PlayerBuzzInAllowed;
[UdonSynced] private int _BuzzedInPlayer = 0;
[UdonSynced] private bool _GameHasBegun = false;
[UdonSynced] private int _QuestionIndex = 0;
[UdonSynced] private int _QuestionStage = 0;
@ -52,24 +17,14 @@ public class GameManager : UdonSharpBehaviour
private DataList _QuestionsList = new DataList();
private DataDictionary _CurrentQuestion;
[UdonSynced] private bool _BuzzInAllowed = false;
[UdonSynced] private bool[] _PlayerBuzzInAllowed;
[UdonSynced] private int _BuzzedInPlayer = 0;
private int[] _FinalRoundPlayersSortedByScore;
private bool _IsBeingHeld = false;
private float _StoredJumpImpulse = 0.0f;
[SerializeField] private PlayerPodium[] _PlayerPodiums;
[UdonSynced] public VRCUrl QuestionURL;
[Header("UI")]
[SerializeField] private HostCardBetweenRoundsInterface _BetweenRoundsInterface;
[SerializeField] private HostCardMultipleChoiceInterface _MultipleChoiceInterface;
[SerializeField] private HostCardLightningRoundInterface _LightningRoundInterface;
[SerializeField] private HostCardTheChaseInterface _TheChaseInterface;
[SerializeField] private HostCardFinalRoundInterface _FinalRoundInterface;
[SerializeField] private HostPanelInterface _AdminPanelInterface;
[Header("Audio")]
[SerializeField] private AudioClip _Ding = null;
[SerializeField] private AudioClip _Buzzer = null;
@ -82,85 +37,42 @@ public class GameManager : UdonSharpBehaviour
[SerializeField] private AudioSource _MusicPlayer = null;
[SerializeField] private AudioSource _SFXPlayer = null;
void Start()
protected override void InitialiseGameMode()
{
_PlayerBuzzInAllowed = new bool[_PlayerPodiums.Length];
ResetBuzzers();
// Download our test question.
VRCStringDownloader.LoadUrl(QuestionURL, (IUdonEventReceiver)this);
base.InitialiseGameMode();
}
public override void OnPickup()
{
Networking.SetOwner(Networking.LocalPlayer, gameObject);
_StoredJumpImpulse = Networking.LocalPlayer.GetJumpImpulse();
Networking.LocalPlayer.SetJumpImpulse(0.0f);
_IsBeingHeld = true;
base.OnPickup();
}
public override void OnDrop()
{
Networking.SetOwner(Networking.InstanceOwner, gameObject);
Networking.LocalPlayer.SetJumpImpulse(_StoredJumpImpulse);
_StoredJumpImpulse = 0.0f;
_IsBeingHeld = false;
base.OnDrop();
}
public override bool OnOwnershipRequest(VRCPlayerApi RequestingPlayer, VRCPlayerApi RequestedOwner)
{
Debug.LogError(RequestingPlayer.displayName + " is requesting that " + RequestedOwner.displayName + " become the new owner of the host card. No fucking way.");
return false;
}
public override void OnOwnershipTransferred(VRCPlayerApi Player)
{
Debug.LogError("New owner is " + Player);
}
public override void InputJump(bool Value, UdonInputEventArgs Args)
{
if (Value && _IsBeingHeld)
{
_AdminPanelInterface.gameObject.SetActive(!_AdminPanelInterface.gameObject.activeSelf);
}
base.InputJump(Value, Args);
}
public override void OnStringLoadSuccess(IVRCStringDownload DownloadedString)
{
string JSONString = DownloadedString.Result;
if (VRCJson.TryDeserializeFromJson(JSONString, out DataToken JSONResult))
{
if (JSONResult.TokenType == TokenType.DataList)
protected override void LoadQuestionData(DataList Data)
{
_QuestionsList.Clear();
_QuestionIndex = 0;
for (int i = 0; i < JSONResult.DataList.Count; i++)
HostCardBetweenRoundsInterface Interface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
for (int i = 0; i < Data.Count; i++)
{
if (JSONResult.DataList[i].TokenType == TokenType.DataDictionary)
if (Data[i].TokenType == TokenType.DataDictionary)
{
_QuestionsList.Add(JSONResult.DataList[i]);
_QuestionsList.Add(Data[i]);
}
}
if (_QuestionsList.Count == 0)
{
_BetweenRoundsInterface.HeaderUI.text =
Interface.HeaderUI.text =
"Unable to find any questions. Ensure the root array elements are all objects.";
return;
}
_CurrentQuestion = _QuestionsList[_QuestionIndex].DataDictionary;
_BetweenRoundsInterface.HeaderUI.text =
Interface.HeaderUI.text =
"Found " + _QuestionsList.Count + " questions in this case file. Press 'Use' button to show scores.";
// Reset podiums on a successful case load
@ -175,34 +87,31 @@ public class GameManager : UdonSharpBehaviour
_GameHasBegun = false;
EnableInteraction("Start Game");
}
else
{
Debug.LogError("Malformed case file. Ensure the first element is an array of objects.");
}
}
}
private void NewMultipleChoiceQuestion()
{
_MultipleChoiceInterface.HeaderUI.text = QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
HostCardMultipleChoiceInterface Interface =
(HostCardMultipleChoiceInterface)GetHostCardInterface(QuestionType.MultipleChoice);
ResetMultipleChoiceInterface(Interface);
Interface.HeaderUI.text = QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
DataList ClueStrings = _CurrentQuestion["Clues"].DataList;
for (int i = 0; i < _MultipleChoiceInterface.CluesUI.Length && i < ClueStrings.Count; i++)
for (int i = 0; i < Interface.CluesUI.Length && i < ClueStrings.Count; i++)
{
_MultipleChoiceInterface.CluesUI[i].text = ClueStrings[i].ToString();
Interface.CluesUI[i].text = ClueStrings[i].ToString();
}
DataList Choices = _CurrentQuestion["Choices"].DataList;
for (int i = 0; i < Choices.Count && i < _MultipleChoiceInterface.ChoiceUI.Length; i++)
for (int i = 0; i < Choices.Count && i < Interface.ChoiceUI.Length; i++)
{
_MultipleChoiceInterface.ChoiceUI[i].text = Choices[i].ToString();
Interface.ChoiceUI[i].text = Choices[i].ToString();
}
_QuestionCorrectResponse = (int)_CurrentQuestion["Correct Response"].Number;
EnableHostCardDisplay(QuestionType.MultipleChoice);
EnableInteraction("Reveal Choice 1");
}
@ -212,25 +121,34 @@ public class GameManager : UdonSharpBehaviour
SendCustomEventDelayedSeconds(nameof(MultipleChoiceRevealChoice2), 1.25f);
SendCustomEventDelayedSeconds(nameof(MultipleChoiceRevealChoice3), 2.5f);
}
public void MultipleChoiceRevealChoice1()
private void MultipleChoiceRevealChoice1()
{
_MultipleChoiceInterface.ChoiceButtonImages[0].color = (_QuestionCorrectResponse == 1) ? Color.green : Color.red;
HostCardMultipleChoiceInterface Interface =
(HostCardMultipleChoiceInterface)GetHostCardInterface(QuestionType.MultipleChoice);
Interface.ChoiceButtonImages[0].color = (_QuestionCorrectResponse == 1) ? Color.green : Color.red;
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, As5);
EnableInteraction("Reveal Choice 2");
}
public void MultipleChoiceRevealChoice2()
private void MultipleChoiceRevealChoice2()
{
_MultipleChoiceInterface.ChoiceButtonImages[1].color = (_QuestionCorrectResponse == 2) ? Color.green : Color.red;
HostCardMultipleChoiceInterface Interface =
(HostCardMultipleChoiceInterface)GetHostCardInterface(QuestionType.MultipleChoice);
Interface.ChoiceButtonImages[1].color = (_QuestionCorrectResponse == 2) ? Color.green : Color.red;
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, C6);
EnableInteraction("Reveal Choice 3");
}
public void MultipleChoiceRevealChoice3()
private void MultipleChoiceRevealChoice3()
{
_MultipleChoiceInterface.ChoiceButtonImages[2].color = (_QuestionCorrectResponse == 3) ? Color.green : Color.red;
HostCardMultipleChoiceInterface Interface =
(HostCardMultipleChoiceInterface)GetHostCardInterface(QuestionType.MultipleChoice);
Interface.ChoiceButtonImages[2].color = (_QuestionCorrectResponse == 3) ? Color.green : Color.red;
DataList Choices = _CurrentQuestion["Choices"].DataList;
EnableChoiceCards();
@ -271,17 +189,20 @@ public class GameManager : UdonSharpBehaviour
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "LockInChoice");
}
_MultipleChoiceInterface.HeaderUI.text = "LOCKED IN";
for (int i = 0; i < _MultipleChoiceInterface.CluesUI.Length; i++)
HostCardMultipleChoiceInterface Interface =
(HostCardMultipleChoiceInterface)GetHostCardInterface(QuestionType.MultipleChoice);
Interface.HeaderUI.text = "LOCKED IN";
for (int i = 0; i < Interface.CluesUI.Length; i++)
{
_MultipleChoiceInterface.CluesUI[i].text = "";
Interface.CluesUI[i].text = "";
}
for (int i = 0; i < _MultipleChoiceInterface.ChoiceUI.Length; i++)
for (int i = 0; i < Interface.ChoiceUI.Length; i++)
{
if (i != (_QuestionCorrectResponse - 1))
{
_MultipleChoiceInterface.ChoiceUI[i].text = "";
Interface.ChoiceUI[i].text = "";
}
}
@ -290,7 +211,10 @@ public class GameManager : UdonSharpBehaviour
private void MultipleChoiceRevealAnswersAndAssignPoints()
{
_MultipleChoiceInterface.HeaderUI.text = "ANSWER REVEALED";
HostCardMultipleChoiceInterface Interface =
(HostCardMultipleChoiceInterface)GetHostCardInterface(QuestionType.MultipleChoice);
Interface.HeaderUI.text = "ANSWER REVEALED";
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
@ -306,39 +230,44 @@ public class GameManager : UdonSharpBehaviour
private void BeginLightningRound()
{
_LightningRoundInterface.HeaderUI.text = QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number)) + " | " + _CurrentQuestion["Location"].ToString();
_LightningRoundInterface.QuestionUI.text = "";
for (int i = 0; i < _LightningRoundInterface.ChoiceUI.Length && i < _LightningRoundInterface.ChoiceButtons.Length; i++)
{
_LightningRoundInterface.ChoiceUI[i].text = "";
}
HostCardLightningRoundInterface Interface =
(HostCardLightningRoundInterface)GetHostCardInterface(QuestionType.LightningRound);
Interface.HeaderUI.text = QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number)) + " | " + _CurrentQuestion["Location"].ToString();
for (int i = 0; i < Interface.ChoiceUI.Length && i < Interface.ChoiceButtons.Length; i++)
{
Interface.ChoiceUI[i].text = "";
}
Interface.QuestionUI.text = "All of these questions are worth 5 Acme Crimebucks. These questions are all about [[CROOK]]'s most recent whereabouts, which is " + _CurrentQuestion["Location"].ToString() + ". Hands on your buzzers. Here's the first question...";
EnableHostCardDisplay(QuestionType.LightningRound);
EnableBuzzers();
EnableInteraction("Next Question");
EnableInteraction("First Question");
}
private void NewLightningRoundQuestion(int Question)
{
DataDictionary CurrentQuestion = _CurrentQuestion["Questions"].DataList[Question - 1].DataDictionary;
_LightningRoundInterface.QuestionUI.text = CurrentQuestion["Question"].ToString();
HostCardLightningRoundInterface Interface =
(HostCardLightningRoundInterface)GetHostCardInterface(QuestionType.LightningRound);
Interface.QuestionUI.text = CurrentQuestion["Question"].ToString();
DataList Choices = CurrentQuestion["Choices"].DataList;
for (int i = 0; i < Choices.Count && i < _LightningRoundInterface.ChoiceUI.Length; i++)
for (int i = 0; i < Choices.Count && i < Interface.ChoiceUI.Length; i++)
{
_LightningRoundInterface.ChoiceUI[i].text = Choices[i].ToString();
Interface.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++)
for (int i = 0; i < Interface.ChoiceButtons.Length && i < Interface.ChoiceButtonImages.Length; i++)
{
_LightningRoundInterface.ChoiceButtonImages[i].color = (_QuestionCorrectResponse == (i + 1)) ? Color.green : Color.red;
_LightningRoundInterface.ChoiceButtons[i].interactable = true;
Interface.ChoiceButtonImages[i].color = (_QuestionCorrectResponse == (i + 1)) ? Color.green : Color.red;
Interface.ChoiceButtons[i].interactable = true;
}
_LightningRoundInterface.OtherButton.interactable = true;
Interface.OtherButton.interactable = true;
EnableBuzzInPeriodForAllPlayers();
}
@ -347,11 +276,14 @@ public class GameManager : UdonSharpBehaviour
{
if (_QuestionCorrectResponse == Answer)
{
for (int i = 0; i < _LightningRoundInterface.ChoiceButtons.Length; i++)
HostCardLightningRoundInterface Interface =
(HostCardLightningRoundInterface)GetHostCardInterface(QuestionType.LightningRound);
for (int i = 0; i < Interface.ChoiceButtons.Length; i++)
{
_LightningRoundInterface.ChoiceButtons[i].interactable = false;
Interface.ChoiceButtons[i].interactable = false;
}
_LightningRoundInterface.OtherButton.interactable = false;
Interface.OtherButton.interactable = false;
int PodiumIndex = _BuzzedInPlayer - 1;
if (PodiumIndex >= 0 && PodiumIndex < _PlayerPodiums.Length)
@ -391,38 +323,58 @@ public class GameManager : UdonSharpBehaviour
private void BeginTheChase()
{
_TheChaseInterface.HeaderUI.text = QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
_TheChaseInterface.ClueUI.text = "";
for (int i = 0; i < _TheChaseInterface.ChoiceUI.Length && i < _TheChaseInterface.ChoiceButtons.Length; i++)
HostCardTheChaseInterface Interface =
(HostCardTheChaseInterface)GetHostCardInterface(QuestionType.TheChase);
Interface.HeaderUI.text = QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
Interface.ClueUI.text = "";
for (int i = 0; i < Interface.ChoiceUI.Length && i < Interface.ChoiceButtons.Length; i++)
{
_TheChaseInterface.ChoiceUI[i].text = "";
Interface.ChoiceUI[i].text = "";
}
EnableHostCardDisplay(QuestionType.TheChase);
EnableBuzzers();
EnableInteraction("Next Question");
EnableInteraction("Play The Music");
}
private void PlayTheChaseMusic()
{
HostCardTheChaseInterface Interface =
(HostCardTheChaseInterface)GetHostCardInterface(QuestionType.TheChase);
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)this, NetworkEventTarget.All, nameof(PlayMusic), MusicEventType.TheChase);
Interface.HeaderUI.text = QuestionTypeToString(QuestionType.TheChase);
Interface.ClueUI.text = "All of these questions are worth 5 Acme Crimebucks. Hands on your buzzers. Listen carefully. Here we go.";
EnableBuzzers();
EnableInteraction("Here We Go");
}
private void NewTheChaseClue(int Clue)
{
DataDictionary CurrentClue = _CurrentQuestion["Clues"].DataList[Clue - 1].DataDictionary;
_TheChaseInterface.ClueUI.text = CurrentClue["Clue"].ToString();
HostCardTheChaseInterface Interface =
(HostCardTheChaseInterface)GetHostCardInterface(QuestionType.TheChase);
Interface.ClueUI.text = CurrentClue["Clue"].ToString();
DataList Choices = CurrentClue["Choices"].DataList;
for (int i = 0; i < Choices.Count && i < _TheChaseInterface.ChoiceUI.Length; i++)
for (int i = 0; i < Choices.Count && i < Interface.ChoiceUI.Length; i++)
{
_TheChaseInterface.ChoiceUI[i].text = Choices[i].ToString();
Interface.ChoiceUI[i].text = Choices[i].ToString();
}
_TheChaseInterface.OtherButton.interactable = true;
Interface.OtherButton.interactable = true;
_QuestionCorrectResponse = (int)CurrentClue["Correct Response"].Number;
for (int i = 0; i < _TheChaseInterface.ChoiceButtons.Length && i < _TheChaseInterface.ChoiceButtonImages.Length; i++)
for (int i = 0; i < Interface.ChoiceButtons.Length && i < Interface.ChoiceButtonImages.Length; i++)
{
_TheChaseInterface.ChoiceButtonImages[i].color = (_QuestionCorrectResponse == (i + 1)) ? Color.green : Color.red;
_TheChaseInterface.ChoiceButtons[i].interactable = true;
Interface.ChoiceButtonImages[i].color = (_QuestionCorrectResponse == (i + 1)) ? Color.green : Color.red;
Interface.ChoiceButtons[i].interactable = true;
}
EnableBuzzInPeriodForAllPlayers();
@ -461,51 +413,59 @@ public class GameManager : UdonSharpBehaviour
}
public void TheChaseEndClue()
{
for (int i = 0; i < _TheChaseInterface.ChoiceButtons.Length; i++)
HostCardTheChaseInterface Interface =
(HostCardTheChaseInterface)GetHostCardInterface(QuestionType.TheChase);
for (int i = 0; i < Interface.ChoiceButtons.Length; i++)
{
_TheChaseInterface.ChoiceButtons[i].interactable = false;
Interface.ChoiceButtons[i].interactable = false;
}
_TheChaseInterface.OtherButton.interactable = false;
Interface.OtherButton.interactable = false;
EndBuzzInPeriod();
EnableInteraction("Next Question");
}
private void BeginFinalRound()
{
_FinalRoundInterface.HeaderUI.text = QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number)) + " | Showing Map Preview";
HostCardFinalRoundInterface Interface =
(HostCardFinalRoundInterface)GetHostCardInterface(QuestionType.FinalRound);
Interface.HeaderUI.text = QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number)) + " | Showing Map Preview";
EnableRiskCards();
DataList ClueStrings = _CurrentQuestion["Clues"].DataList;
for (int i = 0; i < _FinalRoundInterface.CluesUI.Length && i < ClueStrings.Count; i++)
for (int i = 0; i < Interface.CluesUI.Length && i < ClueStrings.Count; i++)
{
_FinalRoundInterface.CluesUI[i].text = ClueStrings[i].ToString();
Interface.CluesUI[i].text = ClueStrings[i].ToString();
}
DataList Choices = _CurrentQuestion["Choices"].DataList;
for (int i = 0; i < Choices.Count && i < _FinalRoundInterface.ChoiceUI.Length; i++)
for (int i = 0; i < Choices.Count && i < Interface.ChoiceUI.Length; i++)
{
_FinalRoundInterface.ChoiceUI[i].text = Choices[i].ToString();
Interface.ChoiceUI[i].text = Choices[i].ToString();
}
_QuestionCorrectResponse = (int)_CurrentQuestion["Correct Response"].Number;
EnableHostCardDisplay(QuestionType.FinalRound);
EnableInteraction("Think About It");
}
private void PlayThinkingMusic()
{
EnableHostCardDisplay(QuestionType.None);
HostCardBetweenRoundsInterface Interface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
Interface.HeaderUI.text = "Think about it...";
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)this, NetworkEventTarget.All, nameof(PlayMusic), MusicEventType.ThinkAboutIt);
SendCustomEventDelayedSeconds(nameof(CountdownFinished), 15.0f);
SendCustomEventDelayedSeconds(nameof(ThinkAboutItCountdownFinished), 15.0f);
}
public void CountdownFinished()
public void ThinkAboutItCountdownFinished()
{
EnableHostCardDisplay(QuestionType.FinalRound);
GetHostCardInterface(QuestionType.FinalRound);
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
@ -521,25 +481,32 @@ public class GameManager : UdonSharpBehaviour
SendCustomEventDelayedSeconds(nameof(FinalRoundRevealChoice2), 1.25f);
SendCustomEventDelayedSeconds(nameof(FinalRoundRevealChoice3), 2.5f);
}
public void FinalRoundRevealChoice1()
private void FinalRoundRevealChoice1()
{
_FinalRoundInterface.ChoiceButtonImages[0].color = (_QuestionCorrectResponse == 1) ? Color.green : Color.red;
HostCardFinalRoundInterface Interface =
(HostCardFinalRoundInterface)GetHostCardInterface(QuestionType.FinalRound);
Interface.ChoiceButtonImages[0].color = (_QuestionCorrectResponse == 1) ? Color.green : Color.red;
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, As5);
EnableInteraction("Reveal Choice 2");
}
public void FinalRoundRevealChoice2()
private void FinalRoundRevealChoice2()
{
_FinalRoundInterface.ChoiceButtonImages[1].color = (_QuestionCorrectResponse == 2) ? Color.green : Color.red;
HostCardFinalRoundInterface Interface =
(HostCardFinalRoundInterface)GetHostCardInterface(QuestionType.FinalRound);
Interface.ChoiceButtonImages[1].color = (_QuestionCorrectResponse == 2) ? Color.green : Color.red;
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, C6);
EnableInteraction("Reveal Choice 3");
}
public void FinalRoundRevealChoice3()
private void FinalRoundRevealChoice3()
{
_FinalRoundInterface.ChoiceButtonImages[2].color = (_QuestionCorrectResponse == 3) ? Color.green : Color.red;
HostCardFinalRoundInterface Interface =
(HostCardFinalRoundInterface)GetHostCardInterface(QuestionType.FinalRound);
Interface.ChoiceButtonImages[2].color = (_QuestionCorrectResponse == 3) ? Color.green : Color.red;
DataList Choices = _CurrentQuestion["Choices"].DataList;
EnableChoiceCards();
@ -580,17 +547,20 @@ public class GameManager : UdonSharpBehaviour
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "LockInChoice");
}
_FinalRoundInterface.HeaderUI.text = "LOCKED IN";
for (int i = 0; i < _FinalRoundInterface.CluesUI.Length; i++)
HostCardFinalRoundInterface Interface =
(HostCardFinalRoundInterface)GetHostCardInterface(QuestionType.FinalRound);
Interface.HeaderUI.text = "LOCKED IN";
for (int i = 0; i < Interface.CluesUI.Length; i++)
{
_FinalRoundInterface.CluesUI[i].text = "";
Interface.CluesUI[i].text = "";
}
for (int i = 0; i < _FinalRoundInterface.ChoiceUI.Length; i++)
for (int i = 0; i < Interface.ChoiceUI.Length; i++)
{
if (i != (_QuestionCorrectResponse - 1))
{
_FinalRoundInterface.ChoiceUI[i].text = "";
Interface.ChoiceUI[i].text = "";
}
}
@ -629,7 +599,10 @@ public class GameManager : UdonSharpBehaviour
{
int PlayerNumber = _FinalRoundPlayersSortedByScore[PlayerPlace - 1];
_FinalRoundInterface.HeaderUI.text = "Player: " + _PlayerPodiums[PlayerNumber - 1].PlayerName;
HostCardBetweenRoundsInterface Interface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
Interface.HeaderUI.text = "Player: " + _PlayerPodiums[PlayerNumber - 1].PlayerName;
_PlayerPodiums[PlayerNumber - 1].EnableBuzzInEffect(true);
EnableInteraction("Assign Points");
@ -693,7 +666,11 @@ public class GameManager : UdonSharpBehaviour
if (TiebreakerNeeded)
{
EnableInteraction("Advance to tiebreaker");
EnableInteraction("Advance To Tiebreaker");
}
else
{
EnableInteraction("End Game");
}
}
@ -704,11 +681,13 @@ public class GameManager : UdonSharpBehaviour
DisableRiskCards();
DisableBuzzers();
HostCardBetweenRoundsInterface Interface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
_QuestionIndex++;
if (_QuestionIndex >= _QuestionsList.Count)
{
_BetweenRoundsInterface.HeaderUI.text = "No More Questions";
EnableHostCardDisplay(QuestionType.None);
Interface.HeaderUI.text = "No More Questions";
DisableInteraction();
return;
}
@ -717,31 +696,28 @@ public class GameManager : UdonSharpBehaviour
_QuestionStage = 0;
// Again, why does this work, but not just casting to an enum?
_BetweenRoundsInterface.HeaderUI.text = "Upcoming Question: " + QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
EnableHostCardDisplay(QuestionType.None);
ResetMultipleChoiceInterface();
Interface.HeaderUI.text = "Upcoming Question: " + QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
EnableInteraction("Show Next Question");
}
private void ResetMultipleChoiceInterface()
private void ResetMultipleChoiceInterface(HostCardMultipleChoiceInterface Interface)
{
_MultipleChoiceInterface.HeaderUI.text = "";
Interface.HeaderUI.text = "";
for (int i = 0; i < _MultipleChoiceInterface.CluesUI.Length; i++)
for (int i = 0; i < Interface.CluesUI.Length; i++)
{
_MultipleChoiceInterface.CluesUI[i].text = "";
Interface.CluesUI[i].text = "";
}
for (int i = 0; i < _MultipleChoiceInterface.ChoiceButtonImages.Length; i++)
for (int i = 0; i < Interface.ChoiceButtonImages.Length; i++)
{
_MultipleChoiceInterface.ChoiceButtonImages[i].color = Color.white;
Interface.ChoiceButtonImages[i].color = Color.white;
}
for (int i = 0; i < _MultipleChoiceInterface.ChoiceUI.Length; i++)
for (int i = 0; i < Interface.ChoiceUI.Length; i++)
{
_MultipleChoiceInterface.ChoiceUI[i].text = "";
Interface.ChoiceUI[i].text = "";
}
}
@ -780,7 +756,7 @@ public class GameManager : UdonSharpBehaviour
}
public void EnableBuzzers()
private void EnableBuzzers()
{
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
@ -788,7 +764,7 @@ public class GameManager : UdonSharpBehaviour
}
}
public void DisableBuzzers()
private void DisableBuzzers()
{
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
@ -796,13 +772,13 @@ public class GameManager : UdonSharpBehaviour
}
}
public void EnableBuzzInPeriodForAllPlayers()
private void EnableBuzzInPeriodForAllPlayers()
{
_BuzzInAllowed = true;
ResetBuzzers();
}
public void WaitForBuzzInsWithoutLastPlayer() {
private void WaitForBuzzInsWithoutLastPlayer() {
_BuzzInAllowed = true;
int PodiumIndex = _BuzzedInPlayer - 1;
if (PodiumIndex >= 0 && PodiumIndex < _PlayerPodiums.Length)
@ -837,13 +813,13 @@ public class GameManager : UdonSharpBehaviour
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFX), SFXEventType.Buzzer);
}
public void EndBuzzInPeriod()
private void EndBuzzInPeriod()
{
_BuzzInAllowed = false;
ResetBuzzers();
}
public void ResetBuzzers()
private void ResetBuzzers()
{
for (int i = 0; i < _PlayerPodiums.Length; i++) {
_PlayerBuzzInAllowed[i] = true;
@ -909,12 +885,13 @@ public class GameManager : UdonSharpBehaviour
switch(_QuestionStage)
{
case 1: BeginTheChase(); break;
case 2: NewTheChaseClue(1); break;
case 3: NewTheChaseClue(2); break;
case 4: NewTheChaseClue(3); break;
case 5: NewTheChaseClue(4); break;
case 6: NewTheChaseClue(5); break;
case 7: AdvanceToNextQuestion(); break;
case 2: PlayTheChaseMusic(); break;
case 3: NewTheChaseClue(1); break;
case 4: NewTheChaseClue(2); break;
case 5: NewTheChaseClue(3); break;
case 6: NewTheChaseClue(4); break;
case 7: NewTheChaseClue(5); break;
case 8: AdvanceToNextQuestion(); break;
default: break;
}
}
@ -1002,10 +979,8 @@ public class GameManager : UdonSharpBehaviour
}
public override void OnPickupUseDown()
protected override void _HostCardUseButtonDown_Internal()
{
if (IsInteractionDisabled()) { return; }
if (!_GameHasBegun)
{
for (int i = 0; i < _PlayerPodiums.Length; i++)
@ -1017,68 +992,16 @@ public class GameManager : UdonSharpBehaviour
}
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlaySFXAtPitch), SFXEventType.Ding, D6);
_BetweenRoundsInterface.HeaderUI.text = "Upcoming Question: " + QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
EnableHostCardDisplay(QuestionType.None);
HostCardBetweenRoundsInterface Interface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(QuestionType.BetweenRounds);
Interface.HeaderUI.text = "Upcoming Question: " + QuestionTypeToString((QuestionType)((int)_CurrentQuestion["Type"].Number));
_GameHasBegun = true;
return;
}
AdvanceQuestion();
base.OnPickupUseDown();
}
private void EnableHostCardDisplay(QuestionType Type)
{
_BetweenRoundsInterface.gameObject.SetActive(false);
_MultipleChoiceInterface.gameObject.SetActive(false);
_LightningRoundInterface.gameObject.SetActive(false);
_TheChaseInterface.gameObject.SetActive(false);
_FinalRoundInterface.gameObject.SetActive(false);
switch (Type)
{
case QuestionType.None:
_BetweenRoundsInterface.gameObject.SetActive(true);
break;
case QuestionType.MultipleChoice:
_MultipleChoiceInterface.gameObject.SetActive(true);
break;
case QuestionType.LightningRound:
_LightningRoundInterface.gameObject.SetActive(true);
break;
case QuestionType.DumpsterDive: break;
case QuestionType.TheChase:
_TheChaseInterface.gameObject.SetActive(true);
break;
case QuestionType.FinalRound:
_FinalRoundInterface.gameObject.SetActive(true);
break;
case QuestionType.Tiebreaker:
default:
break;
}
}
private void EnableInteraction(string NextInteraction = "Advance")
{
DisableInteractive = false;
VRCPickup Pickup = GetComponent<VRCPickup>();
if (Pickup != null)
{
Pickup.UseText = InteractionText;
}
}
private void DisableInteraction()
{
DisableInteractive = true;
}
private bool IsInteractionDisabled()
{
return DisableInteractive;
}
@ -1086,7 +1009,7 @@ public class GameManager : UdonSharpBehaviour
{
switch((int)Type)
{
case (int)QuestionType.None: return "None";
case (int)QuestionType.BetweenRounds: return "None";
case (int)QuestionType.MultipleChoice: return "Standard Round";
case (int)QuestionType.LightningRound: return "Lightning Round";
case (int)QuestionType.DumpsterDive: return "Dumpster Dive";

View File

@ -19,7 +19,7 @@ MonoBehaviour:
sourceCsScript: {fileID: 11500000, guid: 8610437a52d6c2e45adc3167b407ecb8, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 0
behaviourSyncMode: 4
hasInteractEvent: 0
scriptID: 7539454640582602248
serializationData:
@ -42,6 +42,114 @@ MonoBehaviour:
- Name:
Entry: 8
Data:
- Name:
Entry: 12
Data: 10
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _GameManager
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _GameManager
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: GameManagerBase, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 4|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: VRC.Udon.UdonBehaviour, VRC.Udon
- 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: 5|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 6|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: _FinalRoundPlayersSortedByScore
- Name: $v
Entry: 7
Data: 7|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _FinalRoundPlayersSortedByScore
- Name: <UserType>k__BackingField
Entry: 7
Data: 8|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32[], mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 8
- 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: false
- Name: _fieldAttributes
Entry: 7
Data: 9|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@ -51,3 +159,492 @@ MonoBehaviour:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _IsBeingHeld
- Name: $v
Entry: 7
Data: 10|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _IsBeingHeld
- Name: <UserType>k__BackingField
Entry: 7
Data: 11|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean, mscorlib
- Name:
Entry: 8
Data:
- 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: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 12|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: _StoredJumpImpulse
- Name: $v
Entry: 7
Data: 13|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _StoredJumpImpulse
- Name: <UserType>k__BackingField
Entry: 7
Data: 14|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Single, mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 14
- 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: false
- Name: _fieldAttributes
Entry: 7
Data: 15|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: _BetweenRoundsInterface
- Name: $v
Entry: 7
Data: 16|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _BetweenRoundsInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 17|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardBetweenRoundsInterface, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 4
- 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: 18|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 19|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: UI
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 20|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: _MultipleChoiceInterface
- Name: $v
Entry: 7
Data: 21|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _MultipleChoiceInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 22|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardMultipleChoiceInterface, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 4
- 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: 23|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 24|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: _LightningRoundInterface
- Name: $v
Entry: 7
Data: 25|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _LightningRoundInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 26|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardLightningRoundInterface, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 4
- 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: 27|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 28|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: _TheChaseInterface
- Name: $v
Entry: 7
Data: 29|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _TheChaseInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 30|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardTheChaseInterface, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 4
- 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: 31|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 32|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: _FinalRoundInterface
- Name: $v
Entry: 7
Data: 33|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _FinalRoundInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 34|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardFinalRoundInterface, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 4
- 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: 35|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 36|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: _AdminPanelInterface
- Name: $v
Entry: 7
Data: 37|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _AdminPanelInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 38|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostPanelInterface, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 4
- 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:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:

View File

@ -1,13 +1,126 @@

using UdonSharp;
using UnityEngine;
using VRC.SDK3.Data;
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
using VRC.SDKBase;
using VRC.Udon;
using VRC.SDK3.StringLoading;
using VRC.SDK3.Components;
using VRC.Udon.Common;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class HostCardManager : UdonSharpBehaviour
{
void Start()
{
[SerializeField] private GameManagerBase _GameManager;
private int[] _FinalRoundPlayersSortedByScore;
private bool _IsBeingHeld = false;
private float _StoredJumpImpulse = 0.0f;
[Header("UI")]
[SerializeField] private HostCardBetweenRoundsInterface _BetweenRoundsInterface;
[SerializeField] private HostCardMultipleChoiceInterface _MultipleChoiceInterface;
[SerializeField] private HostCardLightningRoundInterface _LightningRoundInterface;
[SerializeField] private HostCardTheChaseInterface _TheChaseInterface;
[SerializeField] private HostCardFinalRoundInterface _FinalRoundInterface;
[SerializeField] private HostPanelInterface _AdminPanelInterface;
public override void OnPickup()
{
Networking.SetOwner(Networking.LocalPlayer, gameObject);
_StoredJumpImpulse = Networking.LocalPlayer.GetJumpImpulse();
Networking.LocalPlayer.SetJumpImpulse(0.0f);
_IsBeingHeld = true;
base.OnPickup();
}
public override void OnDrop()
{
Networking.SetOwner(Networking.InstanceOwner, gameObject);
Networking.LocalPlayer.SetJumpImpulse(_StoredJumpImpulse);
_StoredJumpImpulse = 0.0f;
_IsBeingHeld = false;
base.OnDrop();
}
public override bool OnOwnershipRequest(VRCPlayerApi RequestingPlayer, VRCPlayerApi RequestedOwner)
{
Debug.LogError(RequestingPlayer.displayName + " is requesting that " + RequestedOwner.displayName + " become the new owner of the host card. No fucking way.");
return false;
}
public override void OnOwnershipTransferred(VRCPlayerApi Player)
{
Debug.LogError("New owner is " + Player);
}
public override void InputJump(bool Value, UdonInputEventArgs Args)
{
if (Value && _IsBeingHeld)
{
_AdminPanelInterface.gameObject.SetActive(!_AdminPanelInterface.gameObject.activeSelf);
}
base.InputJump(Value, Args);
}
public override void OnPickupUseDown()
{
_GameManager.HostCardUseButtonDown();
base.OnPickupUseDown();
}
public void SetNextInteractionText(string NextInteractionText)
{
DisableInteractive = false;
VRCPickup Pickup = GetComponent<VRCPickup>();
if (Pickup != null)
{
Pickup.UseText = NextInteractionText;
}
}
public HostCardInterfaceBase EnableHostCardDisplay(QuestionType Type)
{
_BetweenRoundsInterface.gameObject.SetActive(false);
_MultipleChoiceInterface.gameObject.SetActive(false);
_LightningRoundInterface.gameObject.SetActive(false);
_TheChaseInterface.gameObject.SetActive(false);
_FinalRoundInterface.gameObject.SetActive(false);
switch (Type)
{
case QuestionType.BetweenRounds:
_BetweenRoundsInterface.gameObject.SetActive(true);
return _BetweenRoundsInterface;
case QuestionType.MultipleChoice:
_MultipleChoiceInterface.gameObject.SetActive(true);
return _MultipleChoiceInterface;
case QuestionType.LightningRound:
_LightningRoundInterface.gameObject.SetActive(true);
return _LightningRoundInterface;
case QuestionType.DumpsterDive: break;
case QuestionType.TheChase:
_TheChaseInterface.gameObject.SetActive(true);
return _TheChaseInterface;
case QuestionType.FinalRound:
_FinalRoundInterface.gameObject.SetActive(true);
return _FinalRoundInterface;
case QuestionType.Tiebreaker:
default:
return _BetweenRoundsInterface;
}
return _BetweenRoundsInterface;
}
}

View File

@ -116,7 +116,7 @@ MonoBehaviour:
Data: 6|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: GameManager, Assembly-CSharp
Data: GameManagerRound1, Assembly-CSharp
- Name:
Entry: 8
Data:
@ -146,7 +146,13 @@ MonoBehaviour:
Data: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
Data: 1
- Name:
Entry: 7
Data: 9|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
@ -167,13 +173,13 @@ MonoBehaviour:
Data: _PlayerName
- Name: $v
Entry: 7
Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 10|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PlayerName
- Name: <UserType>k__BackingField
Entry: 7
Data: 10|System.RuntimeType, mscorlib
Data: 11|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.String, mscorlib
@ -182,7 +188,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
Data: 11
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -197,19 +203,19 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 11|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 12|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 12|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 13|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 13|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
Data: 14|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@ -233,7 +239,7 @@ MonoBehaviour:
Data: _PlayerID
- Name: $v
Entry: 7
Data: 14|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PlayerID
@ -257,13 +263,13 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 16|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 16|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 17|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@ -287,7 +293,7 @@ MonoBehaviour:
Data: _PlayerScore
- Name: $v
Entry: 7
Data: 17|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 18|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PlayerScore
@ -311,19 +317,19 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 18|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 19|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 19|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 20|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 20|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
Data: 21|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@ -347,13 +353,13 @@ MonoBehaviour:
Data: _ShowScoreCard
- Name: $v
Entry: 7
Data: 21|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 22|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ShowScoreCard
- Name: <UserType>k__BackingField
Entry: 7
Data: 22|System.RuntimeType, mscorlib
Data: 23|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean, mscorlib
@ -362,7 +368,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 22
Data: 23
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -377,19 +383,19 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 23|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 24|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 24|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 25|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 25|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
Data: 26|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@ -413,13 +419,13 @@ MonoBehaviour:
Data: _ChoiceCards
- Name: $v
Entry: 7
Data: 26|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 27|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ChoiceCards
- Name: <UserType>k__BackingField
Entry: 7
Data: 27|System.RuntimeType, mscorlib
Data: 28|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: ChoiceCardGroup, Assembly-CSharp
@ -443,13 +449,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 28|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 29|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 29|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 30|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -473,13 +479,13 @@ MonoBehaviour:
Data: _RiskCards
- Name: $v
Entry: 7
Data: 30|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 31|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RiskCards
- Name: <UserType>k__BackingField
Entry: 7
Data: 31|System.RuntimeType, mscorlib
Data: 32|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: RiskCardGroup, Assembly-CSharp
@ -503,13 +509,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 32|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 33|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 33|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 34|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -533,13 +539,13 @@ MonoBehaviour:
Data: _Buzzer
- Name: $v
Entry: 7
Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 35|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Buzzer
- Name: <UserType>k__BackingField
Entry: 7
Data: 35|System.RuntimeType, mscorlib
Data: 36|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: Buzzer, Assembly-CSharp
@ -563,13 +569,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 36|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: 37|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 38|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -593,13 +599,13 @@ MonoBehaviour:
Data: _BuzzedInEffect
- Name: $v
Entry: 7
Data: 38|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _BuzzedInEffect
- Name: <UserType>k__BackingField
Entry: 7
Data: 39|System.RuntimeType, mscorlib
Data: 40|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.GameObject, UnityEngine.CoreModule
@ -608,7 +614,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 39
Data: 40
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -623,13 +629,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 40|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 41|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 41|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
Data: 42|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: Effects
@ -638,7 +644,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 7
Data: 42|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 43|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -662,16 +668,16 @@ MonoBehaviour:
Data: _ScorecardObject
- Name: $v
Entry: 7
Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 44|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ScorecardObject
- Name: <UserType>k__BackingField
Entry: 9
Data: 39
Data: 40
- Name: <SystemType>k__BackingField
Entry: 9
Data: 39
Data: 40
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -686,13 +692,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 44|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 45|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 45|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 46|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -716,13 +722,13 @@ MonoBehaviour:
Data: _NameplateUI
- Name: $v
Entry: 7
Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 47|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _NameplateUI
- Name: <UserType>k__BackingField
Entry: 7
Data: 47|System.RuntimeType, mscorlib
Data: 48|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
@ -731,7 +737,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 47
Data: 48
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -746,13 +752,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 48|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 49|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 49|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 50|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -776,16 +782,16 @@ MonoBehaviour:
Data: _ScorecardUI
- Name: $v
Entry: 7
Data: 50|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 51|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ScorecardUI
- Name: <UserType>k__BackingField
Entry: 9
Data: 47
Data: 48
- Name: <SystemType>k__BackingField
Entry: 9
Data: 47
Data: 48
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -800,13 +806,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 51|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 52|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 52|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 53|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:

View File

@ -7,12 +7,13 @@ using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
using VRC.Udon.Common;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class PlayerPodium : UdonSharpBehaviour
{
public int PlayerNumber = 0;
public GameManager GameManager;
[SerializeField] public GameManagerRound1 GameManager;
[UdonSynced, FieldChangeCallback(nameof(PlayerName))] private string _PlayerName = "Player";
[UdonSynced] private int _PlayerID = -1;

View File

@ -366,3 +366,21 @@ a6c1d9564b56ecd47b82dfa7a8f11cbe
d419d3432b8a0a24b986e614c57c2039
21221da753878694b9b9518a540dda85
70108d78e82c2ec488d6b504865508e0
46ae6414b09aebf42ab122c226c41825
6e48f857c8e5f094cae38c993a2cce59
439e2414b74264d4bbf5d838b652bd1e
38a0f6eebb239744c952b410c03b89af
6bcdbad1f1fd6fb4599c7ddf75df7ee3
af82c8247b5c6ca46b69dfefc7a9e364
02417c1fddc513b45a833885b863472f
7c646d1ef17cae040979e4344bfd851a
1f76a5e71d6aa6545b628ceb66d907c0
812742149eb095f49810ddee4c46e857
67f6a6e90c5f17340a1351b71cfd77f3
1ecb914f77a803347ba8b570bef9f60f
7670e691e97b25b4282bf9c194b21b38
bee376e351ed71340a174c583a7aa1dc
3032d9b195bb67748830b89e3085bfa1
fe4fba6f914dca943a998dec2467eb1f
3dbd2c3b208506341843174ceac9003c
ba6285bf43e6df547bfa879728df0a5e