Tiebreaker is now functional, and accounts for retries and three-way ties.

This commit is contained in:
Jamie Greunbaum 2025-07-11 19:02:33 -04:00
parent 6de4cef1aa
commit c3c6c51f47
16 changed files with 3699 additions and 473 deletions

View File

@ -105,6 +105,7 @@
<Compile Include="Assets\UdonSharp\UtilityScripts\WorldAudioSettings.cs" />
<Compile Include="Assets\UdonSharp\Player Permissions\PermissionsPanel.cs" />
<Compile Include="Assets\UdonSharp\UtilityScripts\Synced\GlobalToggleObject.cs" />
<Compile Include="Assets\UdonSharp\Host Card Interfaces\HostCardTiebreakerInterface.cs" />
<Compile Include="Assets\UdonSharp\Game Managers\GameManagerRound1.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -48,7 +48,7 @@ Material:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 0.5, y: 0.33333334}
m_Offset: {x: 0.5, y: 0.33333334}
m_Offset: {x: 0, y: 0.6666667}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}

View File

@ -611,7 +611,7 @@ Transform:
m_GameObject: {fileID: 2072657426130996047}
serializedVersion: 2
m_LocalRotation: {x: -0.25881582, y: -0, z: -0, w: 0.96592677}
m_LocalPosition: {x: 0, y: 0, z: 0.15}
m_LocalPosition: {x: 0, y: 0, z: 0.12}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -644,11 +644,11 @@ Transform:
m_GameObject: {fileID: 2509325258865248374}
serializedVersion: 2
m_LocalRotation: {x: -0.7071065, y: -0, z: -0, w: 0.7071071}
m_LocalPosition: {x: 0, y: 0.40699995, z: -0.061499998}
m_LocalPosition: {x: 0, y: 0.2613, z: -0.062}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1408525751748086848}
- {fileID: 8577831597274818056}
m_Father: {fileID: 5617792120913924276}
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!95 &3292427936088400333
@ -917,7 +917,7 @@ Transform:
m_GameObject: {fileID: 3902744920602546784}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 1.041, z: -0.212}
m_LocalPosition: {x: 0, y: 1.041, z: -0.23}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -1156,89 +1156,6 @@ MonoBehaviour:
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 1
--- !u!1 &5471866996204686013
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1408525751748086848}
- component: {fileID: 6189306934509133566}
- component: {fileID: 2742080145557493392}
m_Layer: 13
m_Name: Card Mesh
m_TagString: EditorOnly
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &1408525751748086848
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5471866996204686013}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -0, z: -0.123}
m_LocalScale: {x: 0.75, y: 0.005, z: 0.15}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2250248657447934369}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6189306934509133566
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5471866996204686013}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &2742080145557493392
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5471866996204686013}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 2c0cd617d97924748a9d5e2eeb2039b5, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &6181750060712598379
GameObject:
m_ObjectHideFlags: 0
@ -1347,7 +1264,7 @@ Transform:
m_GameObject: {fileID: 6327497061561740258}
serializedVersion: 2
m_LocalRotation: {x: -0.25881582, y: -0, z: -0, w: 0.96592677}
m_LocalPosition: {x: 0, y: 0, z: -0.15}
m_LocalPosition: {x: 0, y: 0, z: -0.12}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -3322,3 +3239,78 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 8114584825477005890}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &9078223228570343029
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2250248657447934369}
m_Modifications:
- target: {fileID: 790038199363530877, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 790038199363530877, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 790038199363530877, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2917566267679481404, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
propertyPath: CardGroup
value:
objectReference: {fileID: 4424524232366912296}
- target: {fileID: 2917566267679481404, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
propertyPath: ChoiceNumber
value: 3
objectReference: {fileID: 0}
- target: {fileID: 2917566267679481404, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
propertyPath: _HeldPosition
value:
objectReference: {fileID: 2250248657447934369}
- target: {fileID: 2917566267679481404, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
propertyPath: _SpawnPosition
value:
objectReference: {fileID: 6190117174038594721}
- target: {fileID: 2917566267679481404, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
propertyPath: serializationData.Prefab
value:
objectReference: {fileID: 2917566267679481404, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
- target: {fileID: 6482999695541853627, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
propertyPath: m_Name
value: Placeholder
objectReference: {fileID: 0}
- target: {fileID: 6482999695541853627, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6482999695541853627, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
propertyPath: m_TagString
value: EditorOnly
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d83c707b77b55e84daa10ea35b1e8fdf, type: 3}
--- !u!4 &8577831597274818056 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 790038199363530877, guid: d83c707b77b55e84daa10ea35b1e8fdf,
type: 3}
m_PrefabInstance: {fileID: 9078223228570343029}
m_PrefabAsset: {fileID: 0}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -94,7 +94,6 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
if (FlashCorrectAnswer)
{
SubMapIndex = (SubMapIndex == SubMap.CorrectLit) ? SubMap.ThreeLabels : SubMap.CorrectLit;
Debug.LogError("Switching to frame " + SubMapIndex + "...");
SendCustomEventDelayedSeconds(nameof(NextCorrectAnswerFrame), 0.2f);
}
else

View File

@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 17
Data: 20
- Name:
Entry: 7
Data:
@ -290,40 +290,46 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _GameHasBegun
Data: _TiebreakerData
- Name: $v
Entry: 7
Data: 18|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _GameHasBegun
Data: _TiebreakerData
- Name: <UserType>k__BackingField
Entry: 9
Data: 8
Entry: 7
Data: 19|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: VRC.SDKBase.VRCUrl, VRCSDKBase
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 8
Data: 19
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 19|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 20|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 20|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 21|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -344,25 +350,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _QuestionIndex
Data: _GameHasBegun
- 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: _QuestionIndex
Data: _GameHasBegun
- Name: <UserType>k__BackingField
Entry: 7
Data: 22|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32, mscorlib
- Name:
Entry: 8
Data:
Entry: 9
Data: 8
- Name: <SystemType>k__BackingField
Entry: 9
Data: 22
Data: 8
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -404,19 +404,79 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _QuestionStage
Data: _QuestionIndex
- Name: $v
Entry: 7
Data: 25|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _QuestionIndex
- Name: <UserType>k__BackingField
Entry: 7
Data: 26|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32, mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 26
- 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: 27|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 28|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: _QuestionStage
- Name: $v
Entry: 7
Data: 29|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _QuestionStage
- Name: <UserType>k__BackingField
Entry: 9
Data: 22
Data: 26
- Name: <SystemType>k__BackingField
Entry: 9
Data: 22
Data: 26
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -431,13 +491,13 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 26|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 30|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 27|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 31|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@ -461,16 +521,16 @@ MonoBehaviour:
Data: _QuestionSubstage
- Name: $v
Entry: 7
Data: 28|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 32|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _QuestionSubstage
- Name: <UserType>k__BackingField
Entry: 9
Data: 22
Data: 26
- Name: <SystemType>k__BackingField
Entry: 9
Data: 22
Data: 26
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -485,13 +545,13 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 29|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: 30|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 34|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@ -515,16 +575,16 @@ MonoBehaviour:
Data: _QuestionCorrectResponse
- Name: $v
Entry: 7
Data: 31|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 35|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _QuestionCorrectResponse
- Name: <UserType>k__BackingField
Entry: 9
Data: 22
Data: 26
- Name: <SystemType>k__BackingField
Entry: 9
Data: 22
Data: 26
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -537,72 +597,18 @@ MonoBehaviour:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 32|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 33|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: _QuestionsList
- Name: $v
Entry: 7
Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _QuestionsList
- Name: <UserType>k__BackingField
Entry: 7
Data: 35|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: VRC.SDK3.Data.DataList, VRCSDK3
- Name:
Entry: 8
Data:
- 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: false
- Name: _fieldAttributes
Entry: 7
Data: 36|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
Data: 1
- Name:
Entry: 7
Data: 37|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
@ -620,25 +626,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _CurrentQuestion
Data: _QuestionsList
- Name: $v
Entry: 7
Data: 37|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 38|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CurrentQuestion
Data: _QuestionsList
- Name: <UserType>k__BackingField
Entry: 7
Data: 38|System.RuntimeType, mscorlib
Data: 39|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: VRC.SDK3.Data.DataDictionary, VRCSDK3
Data: VRC.SDK3.Data.DataList, VRCSDK3
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 38
Data: 39
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -653,7 +659,115 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 39|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 40|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: _CurrentQuestion
- Name: $v
Entry: 7
Data: 41|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CurrentQuestion
- Name: <UserType>k__BackingField
Entry: 7
Data: 42|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: VRC.SDK3.Data.DataDictionary, VRCSDK3
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 42
- 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: 43|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: _CurrentQuestionType
- Name: $v
Entry: 7
Data: 44|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CurrentQuestionType
- Name: <UserType>k__BackingField
Entry: 7
Data: 45|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: RoundSegmentType, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 26
- 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: 46|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@ -677,7 +791,7 @@ MonoBehaviour:
Data: _BuzzInAllowed
- Name: $v
Entry: 7
Data: 40|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 47|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _BuzzInAllowed
@ -699,120 +813,6 @@ MonoBehaviour:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 41|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 42|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: _PlayerBuzzInAllowed
- Name: $v
Entry: 7
Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PlayerBuzzInAllowed
- Name: <UserType>k__BackingField
Entry: 7
Data: 44|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean[], mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 44
- 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: 45|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 46|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: _BuzzedInPlayer
- Name: $v
Entry: 7
Data: 47|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _BuzzedInPlayer
- Name: <UserType>k__BackingField
Entry: 9
Data: 22
- Name: <SystemType>k__BackingField
Entry: 9
Data: 22
- 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: 48|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
@ -842,16 +842,130 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _FinalRoundPlayersSortedByScore
Data: _PlayerBuzzInAllowed
- Name: $v
Entry: 7
Data: 50|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _FinalRoundPlayersSortedByScore
Data: _PlayerBuzzInAllowed
- Name: <UserType>k__BackingField
Entry: 7
Data: 51|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean[], mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 51
- 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: 52|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 53|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: _BuzzedInPlayer
- Name: $v
Entry: 7
Data: 54|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _BuzzedInPlayer
- Name: <UserType>k__BackingField
Entry: 9
Data: 26
- Name: <SystemType>k__BackingField
Entry: 9
Data: 26
- 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: 55|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 56|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: _FinalRoundPlayersSortedByScore
- Name: $v
Entry: 7
Data: 57|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _FinalRoundPlayersSortedByScore
- Name: <UserType>k__BackingField
Entry: 7
Data: 58|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32[], mscorlib
@ -860,7 +974,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 51
Data: 58
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -875,7 +989,55 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 52|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 59|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: _TiebreakerPlayerNumbers
- Name: $v
Entry: 7
Data: 60|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _TiebreakerPlayerNumbers
- Name: <UserType>k__BackingField
Entry: 9
Data: 58
- Name: <SystemType>k__BackingField
Entry: 9
Data: 58
- 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: 61|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@ -899,13 +1061,13 @@ MonoBehaviour:
Data: _PlayerPodiums
- Name: $v
Entry: 7
Data: 53|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 62|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PlayerPodiums
- Name: <UserType>k__BackingField
Entry: 7
Data: 54|System.RuntimeType, mscorlib
Data: 63|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: PlayerPodium[], Assembly-CSharp
@ -914,7 +1076,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 55|System.RuntimeType, mscorlib
Data: 64|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Component[], UnityEngine.CoreModule
@ -935,13 +1097,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 56|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 65|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 57|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 66|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -965,13 +1127,13 @@ MonoBehaviour:
Data: _AudioManager
- Name: $v
Entry: 7
Data: 58|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 67|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _AudioManager
- Name: <UserType>k__BackingField
Entry: 7
Data: 59|System.RuntimeType, mscorlib
Data: 68|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: AudioManager, Assembly-CSharp
@ -995,13 +1157,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 60|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 69|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 61|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 70|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:

View File

@ -5,6 +5,10 @@ using VRC.SDK3.Data;
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
using VRC.SDKBase;
using Newtonsoft.Json.Converters;
using VRC.Udon.Wrapper.Modules;
using VRC.SDK3.StringLoading;
using System.Collections.Generic;
public enum PresentationMedium
@ -21,6 +25,8 @@ public class GameManagerRound1 : GameManagerBase
[SerializeField] private CaseManager _CaseManager;
[SerializeField] private CaseVideoSyncPlayer _VideoPlayer;
[SerializeField] private VRCUrl _TiebreakerData;
[UdonSynced] protected bool _GameHasBegun = false;
[UdonSynced] private int _QuestionIndex = 0;
@ -29,12 +35,14 @@ public class GameManagerRound1 : GameManagerBase
[UdonSynced] private int _QuestionCorrectResponse = 0;
private DataList _QuestionsList = new DataList();
private DataDictionary _CurrentQuestion;
private RoundSegmentType _CurrentQuestionType = RoundSegmentType.BetweenSegments;
[UdonSynced] private bool _BuzzInAllowed = false;
[UdonSynced] private bool[] _PlayerBuzzInAllowed;
[UdonSynced] private int _BuzzedInPlayer = 0;
private int[] _FinalRoundPlayersSortedByScore;
private int[] _TiebreakerPlayerNumbers;
[SerializeField] private PlayerPodium[] _PlayerPodiums;
@ -104,10 +112,17 @@ public class GameManagerRound1 : GameManagerBase
EnableInteraction("Assign Points");
}
private void AssignStarterPoints()
private void InitialiseQuestion()
{
_CurrentQuestion = _QuestionsList[_QuestionIndex].DataDictionary;
// Again, why does this work, but not just casting to an enum?
_CurrentQuestionType = (RoundSegmentType)(int)_CurrentQuestion["Type"].Number;
_QuestionStage = 0;
}
private void AssignStarterPoints()
{
InitialiseQuestion();
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
@ -212,7 +227,7 @@ public class GameManagerRound1 : GameManagerBase
ResetMultipleChoiceInterface(Interface);
Interface.HeaderUI.text = RoundSegmentTypeToString((RoundSegmentType)((int)_CurrentQuestion["Type"].Number));
Interface.HeaderUI.text = RoundSegmentTypeToString(_CurrentQuestionType);
DataList ClueStrings = _CurrentQuestion["Clues"].DataList;
for (int i = 0; i < Interface.CluesUI.Length && i < ClueStrings.Count; i++)
@ -371,7 +386,7 @@ public class GameManagerRound1 : GameManagerBase
HostCardLightningRoundInterface Interface =
(HostCardLightningRoundInterface)GetHostCardInterface(RoundSegmentType.LightningRound);
Interface.HeaderUI.text = RoundSegmentTypeToString((RoundSegmentType)((int)_CurrentQuestion["Type"].Number)) + " | " + _CurrentQuestion["Location"].ToString();
Interface.HeaderUI.text = RoundSegmentTypeToString(_CurrentQuestionType) + " | " + _CurrentQuestion["Location"].ToString();
for (int i = 0; i < Interface.ChoiceUI.Length && i < Interface.ChoiceButtons.Length; i++)
{
Interface.ChoiceUI[i].text = "";
@ -461,7 +476,7 @@ public class GameManagerRound1 : GameManagerBase
HostCardTheChaseInterface Interface =
(HostCardTheChaseInterface)GetHostCardInterface(RoundSegmentType.TheChase);
Interface.HeaderUI.text = RoundSegmentTypeToString((RoundSegmentType)((int)_CurrentQuestion["Type"].Number));
Interface.HeaderUI.text = RoundSegmentTypeToString(_CurrentQuestionType);
Interface.ClueUI.text = "";
for (int i = 0; i < Interface.ChoiceUI.Length && i < Interface.ChoiceButtons.Length; i++)
{
@ -518,8 +533,6 @@ public class GameManagerRound1 : GameManagerBase
private void TheChaseCheckAnswer(int Answer)
{
Debug.LogError("Answer is " + Answer + ", correct response is " + _QuestionCorrectResponse);
if (_QuestionCorrectResponse == Answer)
{
int PodiumIndex = _BuzzedInPlayer - 1;
@ -611,7 +624,7 @@ public class GameManagerRound1 : GameManagerBase
HostCardMultipleChoiceInterface Interface =
(HostCardMultipleChoiceInterface)GetHostCardInterface(RoundSegmentType.FinalRound);
Interface.HeaderUI.text = RoundSegmentTypeToString((RoundSegmentType)((int)_CurrentQuestion["Type"].Number));
Interface.HeaderUI.text = RoundSegmentTypeToString(_CurrentQuestionType);
DataList ClueStrings = _CurrentQuestion["Clues"].DataList;
for (int i = 0; i < Interface.CluesUI.Length && i < ClueStrings.Count; i++)
@ -788,7 +801,7 @@ public class GameManagerRound1 : GameManagerBase
// about to finish up, so just move on to determining winners.
if (PlayerPlace == 1)
{
FinalRoundDetermineWinners();
EnableInteraction("End Of Round");
}
else
{
@ -796,8 +809,14 @@ public class GameManagerRound1 : GameManagerBase
}
}
private void FinalRoundDetermineWinners()
private bool FinalRoundCheckNeedForTiebreaker()
{
DisableChoiceCards();
DisableRiskCards();
DisableBuzzers();
_VideoPlayer.ClearScreen();
SortPlayersHighToLowScore();
int[] SortedPlayerScores = new int[_PlayerPodiums.Length];
@ -809,50 +828,60 @@ public class GameManagerRound1 : GameManagerBase
HostCardBetweenRoundsInterface Interface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
PlayerPodium Number1Podium = _PlayerPodiums[_FinalRoundPlayersSortedByScore[0] - 1];
PlayerPodium Number2Podium = _PlayerPodiums[_FinalRoundPlayersSortedByScore[1] - 1];
PlayerPodium Number3Podium = _PlayerPodiums[_FinalRoundPlayersSortedByScore[2] - 1];
VRCPlayerApi Number1 = Networking.GetOwner(Number1Podium.gameObject);
VRCPlayerApi Number2 = Networking.GetOwner(Number2Podium.gameObject);
VRCPlayerApi Number3 = Networking.GetOwner(Number3Podium.gameObject);
bool TiebreakerNeeded = false;
if (SortedPlayerScores[1] == SortedPlayerScores[2])
{
if (SortedPlayerScores[0] == SortedPlayerScores[1])
{
Interface.HeaderUI.text = "Three-way tie; two tiebreakers will appear here in the final version.";
Interface.HeaderUI.text = "We have a three-way tie. We'll start with a tiebreaker between " + Number2.displayName + " and " + Number3.displayName + ".";
}
else
{
Interface.HeaderUI.text = "Tie for second place between [[PLAYER]] and [[PLAYER]]; tiebreaker will appear here in the final version.";
Interface.HeaderUI.text = Number1.displayName + " is in first place and will be moving on to the next round. There is a tie for second place between " + Number2.displayName + " and " + Number3.displayName + ", so we will move on to a tiebreaker.";
}
TiebreakerNeeded = true;
PrepareTiebreakerRound(Number2Podium.PlayerNumber, Number3Podium.PlayerNumber);
}
else
{
VRCPlayerApi Number1 = Networking.GetOwner(_PlayerPodiums[_FinalRoundPlayersSortedByScore[0] - 1].gameObject);
VRCPlayerApi Number2 = Networking.GetOwner(_PlayerPodiums[_FinalRoundPlayersSortedByScore[1] - 1].gameObject);
if (SortedPlayerScores[0] == SortedPlayerScores[1])
{
// Tag both players as being tied for first place
Number1.SetPlayerTag("Round1State", "TiedForFirstPlace");
Number2.SetPlayerTag("Round2State", "TiedForFirstPlace");
// Randomly choose which player gets the first turn in the next round.
Random.InitState(Networking.GetServerTimeInMilliseconds());
VRCPlayerApi[] Randomiser = new VRCPlayerApi[2];
Randomiser[0] = Number1;
Randomiser[1] = Number2;
int RandomIndex = Random.Range(0, 2);
Randomiser[RandomIndex].SetPlayerTag("Round1State", "FirstPlace");
Interface.HeaderUI.text = "[[PLAYER]] and [[PLAYER]] are tied for first; both will move on to the next round.";
Interface.HeaderUI.text = Number1.displayName + " and " + Number2.displayName + " are tied for first place; both will move on to the next round.";
}
else
{
// Tag first place player as first place, and second place as second
// Tag first place player as first place.
Number1.SetPlayerTag("Round1State", "FirstPlace");
Number2.SetPlayerTag("Round2State", "SecondPlace");
Interface.HeaderUI.text = "[[FIRSTPLACEPLAYER]] and [[SECONDPLACEPLAYER]] will move on to the next round.";
Interface.HeaderUI.text = Number1.displayName + " and " + Number2.displayName + " will move on to the next round.";
}
}
if (TiebreakerNeeded)
{
EnableInteraction("Advance To Tiebreaker");
}
else
{
EnableInteraction("End Game");
}
return TiebreakerNeeded;
}
private void PrepareTiebreakerRound(int FirstPlayer, int SecondPlayer)
{
_QuestionStage = 0;
_TiebreakerPlayerNumbers = new int[2];
_TiebreakerPlayerNumbers[0] = FirstPlayer;
_TiebreakerPlayerNumbers[1] = SecondPlayer;
}
@ -864,24 +893,152 @@ public class GameManagerRound1 : GameManagerBase
_VideoPlayer.ClearScreen();
HostCardBetweenRoundsInterface Interface = ShowBetweenQuestionsInterface();
_QuestionIndex++;
if (_QuestionIndex >= _QuestionsList.Count)
{
Interface.HeaderUI.text = "Round is over. Move to the loot recovery area.";
_CaseManager.ContinueToRound2();
return;
PrepareEndGame();
}
else
{
PrepareNextQuestion();
}
}
private void PrepareNextQuestion()
{
InitialiseQuestion();
_CurrentQuestion = _QuestionsList[_QuestionIndex].DataDictionary;
_QuestionStage = 0;
// Again, why does this work, but not just casting to an enum?
Interface.HeaderUI.text = "Upcoming Question: " + RoundSegmentTypeToString((RoundSegmentType)((int)_CurrentQuestion["Type"].Number));
ShowBetweenQuestionsInterface();
EnableInteraction("Show Next Question");
}
private void PrepareEndGame()
{
bool TiebreakerNeeded = FinalRoundCheckNeedForTiebreaker();
if (TiebreakerNeeded)
{
_CurrentQuestionType = RoundSegmentType.Tiebreaker;
EnableInteraction("Advance To Tiebreaker");
}
else
{
HostCardBetweenRoundsInterface Interface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
Interface.HeaderUI.text = "Round is over. Move to the loot recovery area.";
_CaseManager.ContinueToRound2();
EnableInteraction("End Game");
}
}
private void BeginTiebreakerRound()
{
HostCardBetweenRoundsInterface Interface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
Interface.HeaderUI.text = "Preparing tiebreaker...";
VRCStringDownloader.LoadUrl(_TiebreakerData, (IUdonEventReceiver)this);
}
public override void OnStringLoadSuccess(IVRCStringDownload TiebreakerString)
{
HostCardTiebreakerInterface Interface =
(HostCardTiebreakerInterface)GetHostCardInterface(RoundSegmentType.Tiebreaker);
string ErrorString = "";
string JSONString = TiebreakerString.Result;
if (VRCJson.TryDeserializeFromJson(JSONString, out DataToken JSONResult))
{
if (JSONResult.TokenType == TokenType.DataDictionary)
{
DataDictionary TiebreakerDictionary = JSONResult.DataDictionary;
DataList TiebreakerRegions = TiebreakerDictionary.GetKeys();
Random.InitState(Networking.GetServerTimeInMilliseconds());
int TiebreakerIndex = Random.Range(0, TiebreakerRegions.Count);
string TiebreakerRegion = TiebreakerRegions[TiebreakerIndex].String;
Interface.ChoiceUI[1].text = TiebreakerRegion;
if (TiebreakerDictionary[TiebreakerRegion].TokenType == TokenType.DataDictionary)
{
DataDictionary RegionDictionary = TiebreakerDictionary[TiebreakerRegion].DataDictionary;
if (RegionDictionary.ContainsKey("Type") && RegionDictionary.ContainsKey("Key Locations"))
{
Interface.HeaderUI.text = "Tiebreaker | " + RegionDictionary["Type"].String;
if (RegionDictionary["Key Locations"].TokenType == TokenType.DataList)
{
DataList KeyLocations = RegionDictionary["Key Locations"].DataList;
for (int i = 0; i < KeyLocations.Count && i < Interface.CluesUI.Length; i++)
{
Interface.CluesUI[i].text = KeyLocations[i].String;
}
EnableBuzzInPeriodForPlayer(_TiebreakerPlayerNumbers[0]);
EnableBuzzInPeriodForPlayer(_TiebreakerPlayerNumbers[1]);
}
else
{
ErrorString = "The Key Locations key should be a list of locations.";
}
}
else
{
ErrorString = "Each region entry should have a region type and a list of key locations.";
}
}
else
{
ErrorString = "Ensure the elements of the root dictionary are all dictionaries.";
}
}
else
{
ErrorString = "Ensure the first element is a dictionary.";
}
}
else
{
ErrorString = "Could not parse JSON document.";
}
if (ErrorString != "")
{
Debug.LogError("Malformed tiebreaker data file. " + ErrorString);
}
}
public void TiebreakerIncorrectResponse()
{
int PodiumIndex = _BuzzedInPlayer - 1;
if (PodiumIndex >= 0 && PodiumIndex < _PlayerPodiums.Length)
{
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)_PlayerPodiums[PodiumIndex],
NetworkEventTarget.All,
"EnableBuzzInEffect", false);
}
_BuzzedInPlayer = -1;
_BuzzInAllowed = true;
RequestSerialization();
}
public void TiebreakerCorrectResponse()
{
int PodiumIndex = _BuzzedInPlayer - 1;
if (PodiumIndex >= 0 && PodiumIndex < _PlayerPodiums.Length)
{
_PlayerPodiums[PodiumIndex].AdjustScore(5);
}
_BuzzedInPlayer = -1;
DisableBuzzers();
EndBuzzInPeriod();
EnableInteraction("End Tiebreaker");
}
private void ResetMultipleChoiceInterface(HostCardMultipleChoiceInterface Interface)
{
@ -960,6 +1117,21 @@ public class GameManagerRound1 : GameManagerBase
ResetBuzzers();
}
private void EnableBuzzInPeriodForPlayer(int PlayerNumber)
{
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
if (_PlayerPodiums[i].PlayerNumber == PlayerNumber)
{
_PlayerBuzzInAllowed[i] = true;
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_PlayerPodiums[i], NetworkEventTarget.All, "EnableBuzzer", true);
_BuzzedInPlayer = -1;
break;
}
}
_BuzzInAllowed = true;
}
private void WaitForBuzzInsWithoutLastPlayer()
{
_BuzzInAllowed = true;
@ -967,12 +1139,13 @@ public class GameManagerRound1 : GameManagerBase
if (PodiumIndex >= 0 && PodiumIndex < _PlayerPodiums.Length)
{
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)_PlayerPodiums[_BuzzedInPlayer - 1],
(IUdonEventReceiver)_PlayerPodiums[PodiumIndex],
NetworkEventTarget.All,
"EnableBuzzInEffect", false);
_BuzzedInPlayer = -1;
RequestSerialization();
}
RequestSerialization();
}
[NetworkCallable]
@ -1038,12 +1211,13 @@ public class GameManagerRound1 : GameManagerBase
// 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 two numbers, they're the same fucking thing".
switch ((int)_CurrentQuestion["Type"].Number)
switch (_CurrentQuestionType)
{
case (int)RoundSegmentType.MultipleChoice: AdvanceMultipleChoiceStage(); break;
case (int)RoundSegmentType.LightningRound: AdvanceLightningRoundQuestion(); break;
case (int)RoundSegmentType.TheChase: AdvanceTheChase(); break;
case (int)RoundSegmentType.FinalRound: AdvanceFinalRound(); break;
case RoundSegmentType.MultipleChoice: AdvanceMultipleChoiceStage(); break;
case RoundSegmentType.LightningRound: AdvanceLightningRoundQuestion(); break;
case RoundSegmentType.TheChase: AdvanceTheChase(); break;
case RoundSegmentType.FinalRound: AdvanceFinalRound(); break;
case RoundSegmentType.Tiebreaker: AdvanceTiebreaker(); break;
}
RequestSerialization();
@ -1126,6 +1300,16 @@ public class GameManagerRound1 : GameManagerBase
}
}
private void AdvanceTiebreaker()
{
switch(_QuestionStage)
{
case 1: BeginTiebreakerRound(); break;
case 2: AdvanceToNextQuestion(); break;
default: break;
}
}
public VRCUrl GetMapURL(int MapIndex)
{
@ -1147,7 +1331,9 @@ public class GameManagerRound1 : GameManagerBase
{
HostCardBetweenRoundsInterface Interface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
Interface.HeaderUI.text = "Upcoming Question: " + RoundSegmentTypeToString((RoundSegmentType)((int)_CurrentQuestion["Type"].Number));
Interface.HeaderUI.text = "Upcoming Question: " + RoundSegmentTypeToString(_CurrentQuestionType);
return Interface;
}
}

View File

@ -197,6 +197,15 @@ public class GameManagerRound2 : GameManagerBase
}
private void EndRound()
{
HostCardBetweenRoundsInterface Interface =
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
Interface.HeaderUI.text = "Round is over. Let's go to the map!";
_CaseManager.ContinueToRound3();
}
public void LocationBoardReset()
{
NetworkCalling.SendCustomNetworkEvent(
@ -253,9 +262,9 @@ public class GameManagerRound2 : GameManagerBase
_StageIndex++;
switch(_StageIndex)
{
case 1: DisplayBriefing(); break;
case 2: BeginRound(); break;
case 3: _CaseManager.ContinueToRound3(); break;
case 1: DisplayBriefing(); break;
case 2: BeginRound(); break;
case 3: EndRound(); break;
}
}

View File

@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 12
Data: 13
- Name:
Entry: 7
Data:
@ -473,19 +473,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _RecoverTheLootExplainerInterface
Data: _TiebreakerInterface
- Name: $v
Entry: 7
Data: 30|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RecoverTheLootExplainerInterface
Data: _TiebreakerInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 31|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardRecoverTheLootExplainerInterface, Assembly-CSharp
Data: HostCardTiebreakerInterface, Assembly-CSharp
- Name:
Entry: 8
Data:
@ -533,19 +533,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _RecoverTheLootInterface
Data: _RecoverTheLootExplainerInterface
- Name: $v
Entry: 7
Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RecoverTheLootInterface
Data: _RecoverTheLootExplainerInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 35|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardRecoverTheLootInterface, Assembly-CSharp
Data: HostCardRecoverTheLootExplainerInterface, Assembly-CSharp
- Name:
Entry: 8
Data:
@ -593,19 +593,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _CaptureCarmenExplainerInterface
Data: _RecoverTheLootInterface
- Name: $v
Entry: 7
Data: 38|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CaptureCarmenExplainerInterface
Data: _RecoverTheLootInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 39|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardCaptureCarmenExplainerInterface, Assembly-CSharp
Data: HostCardRecoverTheLootInterface, Assembly-CSharp
- Name:
Entry: 8
Data:
@ -653,19 +653,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _CaptureCarmenInterface
Data: _CaptureCarmenExplainerInterface
- Name: $v
Entry: 7
Data: 42|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CaptureCarmenInterface
Data: _CaptureCarmenExplainerInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 43|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostCardCaptureCarmenInterface, Assembly-CSharp
Data: HostCardCaptureCarmenExplainerInterface, Assembly-CSharp
- Name:
Entry: 8
Data:
@ -713,19 +713,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _AdminPanelInterface
Data: _CaptureCarmenInterface
- Name: $v
Entry: 7
Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _AdminPanelInterface
Data: _CaptureCarmenInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 47|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: HostPanelInterface, Assembly-CSharp
Data: HostCardCaptureCarmenInterface, Assembly-CSharp
- Name:
Entry: 8
Data:
@ -768,6 +768,66 @@ MonoBehaviour:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _AdminPanelInterface
- Name: $v
Entry: 7
Data: 50|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _AdminPanelInterface
- Name: <UserType>k__BackingField
Entry: 7
Data: 51|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: 52|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- 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: 13
Data:

View File

@ -1,11 +1,7 @@

using UdonSharp;
using UnityEngine;
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;
@ -23,6 +19,7 @@ public class HostCardManager : UdonSharpBehaviour
[SerializeField] private HostCardMultipleChoiceInterface _MultipleChoiceInterface;
[SerializeField] private HostCardLightningRoundInterface _LightningRoundInterface;
[SerializeField] private HostCardTheChaseInterface _TheChaseInterface;
[SerializeField] private HostCardTiebreakerInterface _TiebreakerInterface;
[SerializeField] private HostCardRecoverTheLootExplainerInterface _RecoverTheLootExplainerInterface;
[SerializeField] private HostCardRecoverTheLootInterface _RecoverTheLootInterface;
@ -112,6 +109,7 @@ public class HostCardManager : UdonSharpBehaviour
_MultipleChoiceInterface.gameObject.SetActive(false);
_LightningRoundInterface.gameObject.SetActive(false);
_TheChaseInterface.gameObject.SetActive(false);
_TiebreakerInterface.gameObject.SetActive(false);
_RecoverTheLootExplainerInterface.gameObject.SetActive(false);
_RecoverTheLootInterface.gameObject.SetActive(false);
@ -139,8 +137,8 @@ public class HostCardManager : UdonSharpBehaviour
_MultipleChoiceInterface.gameObject.SetActive(true);
return _MultipleChoiceInterface;
case RoundSegmentType.Tiebreaker:
_BetweenRoundsInterface.gameObject.SetActive(true);
return _BetweenRoundsInterface;
_TiebreakerInterface.gameObject.SetActive(true);
return _TiebreakerInterface;
}
} break;
case RoundType.RecoverTheLoot:

View File

@ -0,0 +1,317 @@
%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: HostCardTiebreakerInterface
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 569917456d481d04f9cd37d92e28dd58,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 797dc930a907f824d800dd3f5ac239c4, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 4
hasInteractEvent: 0
scriptID: 6420544545487963093
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: 5
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: HeaderUI
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: HeaderUI
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 3
- 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: 4|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: ChoiceUI
- Name: $v
Entry: 7
Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ChoiceUI
- Name: <UserType>k__BackingField
Entry: 7
Data: 6|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI[], Unity.TextMeshPro
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 6
- 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: 7|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: ChoiceButtonImages
- Name: $v
Entry: 7
Data: 8|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ChoiceButtonImages
- Name: <UserType>k__BackingField
Entry: 7
Data: 9|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.UI.Image[], UnityEngine.UI
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 9
- 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: 10|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: 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
- Name: <UserType>k__BackingField
Entry: 9
Data: 6
- Name: <SystemType>k__BackingField
Entry: 9
Data: 6
- 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: 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: 13
Data:
- Name:
Entry: 8
Data:

View File

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

View File

@ -0,0 +1,12 @@

using UdonSharp;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class HostCardTiebreakerInterface : HostCardInterfaceBase
{
public TextMeshProUGUI[] CluesUI;
}

View File

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

View File

@ -10,8 +10,8 @@ AudioManager:
Default Speaker Mode: 2
m_SampleRate: 48000
m_DSPBufferSize: 1024
m_VirtualVoiceCount: 32
m_RealVoiceCount: 24
m_VirtualVoiceCount: 64
m_RealVoiceCount: 32
m_EnableOutputSuspension: 1
m_SpatializerPlugin: OculusSpatializer
m_AmbisonicDecoderPlugin: OculusSpatializer