- Added proper podiums and pedestals to round 2.

- Countries in round 3 are now randomised on load instead of on initialisation.
- View tablet now properly resets position on spawn and despawn.
This commit is contained in:
2026-04-26 15:28:50 -04:00
parent 86576b8340
commit f10f7b6fe7
73 changed files with 3945 additions and 2451 deletions
+167
View File
@@ -0,0 +1,167 @@
%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: Buzzer
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 45ea1511f04a18e48a185a829a290455,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 86b4e06bba88ab84ab3aae396f32d70f, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 0
hasInteractEvent: 0
scriptID: -2466850991558166796
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: 2
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: Podium
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: Podium
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: PlayerPodium, 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: 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: _GameManager
- Name: $v
Entry: 7
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _GameManager
- Name: <UserType>k__BackingField
Entry: 7
Data: 7|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: GameManagerRound1, 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: false
- Name: _fieldAttributes
Entry: 7
Data: 8|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:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e84e4204e73a6414e8a5c10d7862d8be
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+32
View File
@@ -0,0 +1,32 @@
using UdonSharp;
using UnityEngine;
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
using VRC.SDKBase;
using VRC.Udon;
public class Buzzer : UdonSharpBehaviour
{
public PlayerPodium Podium;
private GameManagerRound1 _GameManager;
public void SetGameManager(GameManagerRound1 Manager)
{
_GameManager = Manager;
}
public override void OnPickupUseDown()
{
VRCPlayerApi LocalPlayer = Networking.LocalPlayer;
if (Podium.GetPlayerID() == LocalPlayer.playerId)
{
_GameManager.SendCustomNetworkEvent(NetworkEventTarget.Owner,
"PlayerBuzzedIn", Podium.PlayerNumber);
}
base.OnPickupUseDown();
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 86b4e06bba88ab84ab3aae396f32d70f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+353
View File
@@ -0,0 +1,353 @@
%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: ChoiceCard
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 2bde40f0de0d2814daa3b6cd7e581e72,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 1ecd98174f84ffa4b93712c1d1b30a59, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 4
hasInteractEvent: 1
scriptID: -4699376671505787403
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: ChoiceNumber
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: ChoiceNumber
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32, mscorlib
- 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: 3
Data: 1
- 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: 1
- Name:
Entry: 7
Data: 5|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: CardGroup
- Name: $v
Entry: 7
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: CardGroup
- Name: <UserType>k__BackingField
Entry: 7
Data: 7|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: ChoiceCardGroup, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 8|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: 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: _Mesh
- Name: $v
Entry: 7
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Mesh
- Name: <UserType>k__BackingField
Entry: 7
Data: 12|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.MeshRenderer, UnityEngine.CoreModule
- 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: 1
- Name:
Entry: 7
Data: 14|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: _SpawnPosition
- Name: $v
Entry: 7
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SpawnPosition
- Name: <UserType>k__BackingField
Entry: 7
Data: 16|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Transform, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 16
- 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: 17|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 18|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: _HeldPosition
- Name: $v
Entry: 7
Data: 19|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _HeldPosition
- Name: <UserType>k__BackingField
Entry: 9
Data: 16
- Name: <SystemType>k__BackingField
Entry: 9
Data: 16
- 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: 20|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 21|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:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 221c60eb00090d54bb64570833c9a2d5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+56
View File
@@ -0,0 +1,56 @@
using UdonSharp;
using UnityEngine;
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class ChoiceCard : UdonSharpBehaviour
{
[UdonSynced] public int ChoiceNumber = 0;
[SerializeField] private ChoiceCardGroup CardGroup = null;
[SerializeField] private MeshRenderer _Mesh;
[SerializeField] private Transform _SpawnPosition;
[SerializeField] private Transform _HeldPosition;
public override void OnPickup()
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)CardGroup, NetworkEventTarget.All, "ChoiceCardPickedUp", ChoiceNumber);
}
public override void Interact()
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)CardGroup, NetworkEventTarget.All, "ChoiceCardInteract", ChoiceNumber);
}
public void SetCardGroup(ChoiceCardGroup ParentCardGroup)
{
CardGroup = ParentCardGroup;
}
public void SetColourMaterial(Material Colour)
{
_Mesh.sharedMaterial = Colour;
}
[NetworkCallable]
public void SetToHeldPosition()
{
transform.SetParent(_HeldPosition, false);
transform.localPosition = Vector3.zero;
transform.localEulerAngles = Vector3.zero;
InteractionText = "Reveal";
}
[NetworkCallable]
public void ResetPosition()
{
transform.SetParent(_SpawnPosition, false);
transform.localPosition = Vector3.zero;
transform.localEulerAngles = Vector3.zero;
InteractionText = "Choose";
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1ecd98174f84ffa4b93712c1d1b30a59
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,485 @@
%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: ChoiceCardGroup
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 7e78a2ccac5c3e547abc2312ba9a455c,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 53ded36b5511644438dd179343f93e5a, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 4
hasInteractEvent: 0
scriptID: 3686401941242233976
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: 7
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _Podium
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Podium
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: PlayerPodium, 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: _ChoiceCards
- Name: $v
Entry: 7
Data: 7|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ChoiceCards
- Name: <UserType>k__BackingField
Entry: 7
Data: 8|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: ChoiceCard[], Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 9|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Component[], UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 10|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 11|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: _ChoiceCardText
- Name: $v
Entry: 7
Data: 12|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ChoiceCardText
- Name: <UserType>k__BackingField
Entry: 7
Data: 13|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI[], Unity.TextMeshPro
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 13
- 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: 14|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 15|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: _ChoiceCardColourOptions
- Name: $v
Entry: 7
Data: 16|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ChoiceCardColourOptions
- Name: <UserType>k__BackingField
Entry: 7
Data: 17|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Material[], UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 17
- 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: 1
- Name:
Entry: 7
Data: 19|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: _PCCardHeldPosition
- Name: $v
Entry: 7
Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PCCardHeldPosition
- Name: <UserType>k__BackingField
Entry: 7
Data: 21|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.GameObject, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 21
- 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: 22|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 23|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: _PCCardAnimator
- Name: $v
Entry: 7
Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PCCardAnimator
- Name: <UserType>k__BackingField
Entry: 7
Data: 25|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Animator, UnityEngine.AnimationModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 25
- 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: 26|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 27|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: _SelectedChoice
- Name: $v
Entry: 7
Data: 28|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SelectedChoice
- Name: <UserType>k__BackingField
Entry: 7
Data: 29|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32, mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 29
- 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: 30|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 31|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: 13
Data:
- Name:
Entry: 8
Data:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e3674ffb69c83514c8e3993fbfd8371c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+177
View File
@@ -0,0 +1,177 @@
using TMPro;
using UdonSharp;
using UnityEngine;
using VRC.SDK3.Components;
using VRC.SDK3.UdonNetworkCalling;
using VRC.SDKBase;
using VRC.Udon.Common.Interfaces;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class ChoiceCardGroup : UdonSharpBehaviour
{
[SerializeField] private PlayerPodium _Podium;
[SerializeField] private ChoiceCard[] _ChoiceCards;
[SerializeField] private TextMeshProUGUI[] _ChoiceCardText;
[SerializeField] private Material[] _ChoiceCardColourOptions;
[SerializeField] private GameObject _PCCardHeldPosition;
[SerializeField] private Animator _PCCardAnimator;
[UdonSynced] private int _SelectedChoice = -1;
void Start()
{
for (int i = 0; i < _ChoiceCards.Length; i++)
{
ChoiceCard Card = _ChoiceCards[i];
Card.SetCardGroup(this);
}
}
[NetworkCallable]
public void ChoiceCardPickedUp(int ChoiceNumber)
{
_SelectedChoice = ChoiceNumber;
}
[NetworkCallable]
public void ChoiceCardInteract(int ChoiceNumber)
{
if (_SelectedChoice == ChoiceNumber)
{
RevealChoice();
return;
}
_SelectedChoice = ChoiceNumber;
VRCPlayerApi Player = Networking.GetOwner(_Podium.gameObject);
Debug.Assert(Player != null);
for (int i = 0; i < _ChoiceCards.Length; i++)
{
ChoiceCard Card = _ChoiceCards[i];
_PCCardAnimator.SetBool("Turn Forward", false);
Card.DisableInteractive = false;
if (Card.ChoiceNumber == _SelectedChoice)
{
if (!Player.IsUserInVR())
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)Card, NetworkEventTarget.All, "SetToHeldPosition");
Card.DisableInteractive = true;
}
}
else
{
Card.ResetPosition();
}
}
}
private void RevealChoice()
{
VRCPlayerApi Player = Networking.GetOwner(_Podium.gameObject);
if (Player != null && !Player.IsUserInVR())
{
for (int i = 0; i < _ChoiceCards.Length; i++)
{
ChoiceCard Card = _ChoiceCards[i];
if (Card.ChoiceNumber == _SelectedChoice)
{
VRCPickup Pickup = Card.GetComponent<VRCPickup>();
if (Pickup != null)
{
Pickup.Drop();
}
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)Card, NetworkEventTarget.All, "SetToHeldPosition");
_PCCardAnimator.SetBool("Turn Forward", true);
Card.DisableInteractive = true;
}
else
{
Card.ResetPosition();
}
}
}
}
public int GetSelectedChoice()
{
return _SelectedChoice;
}
public void SetChoices(string[] Choices, int[] Indices)
{
for (int i = 0; i < _ChoiceCards.Length && i < _ChoiceCardText.Length; i++)
{
_ChoiceCards[Indices[i]].ChoiceNumber = (i + 1);
_ChoiceCardText[Indices[i]].text = Choices[i];
}
}
[NetworkCallable]
public void MakeChoiceTextVisible()
{
for (int i = 0; i < _ChoiceCards.Length && i < _ChoiceCardText.Length; i++)
{
_ChoiceCardText[i].gameObject.SetActive(true);
}
}
public void LockInChoice()
{
for (int i = 0; i < _ChoiceCards.Length; i++)
{
ChoiceCard Card = _ChoiceCards[i];
if (Card.ChoiceNumber == _SelectedChoice) { Card.DisableInteractive = false; continue; }
Card.DisableInteractive = true;
VRCPickup Pickup = Card.GetComponent<VRCPickup>();
if (Pickup != null) { Pickup.pickupable = false; }
}
}
public void ResetCards(int Colour = 0)
{
_SelectedChoice = -1;
VRCPlayerApi Player = Networking.GetOwner(_Podium.gameObject);
Debug.Assert(Player != null);
bool IsInVR = Player.IsUserInVR();
for (int i = 0; i < _ChoiceCards.Length; i++)
{
ChoiceCard Card = _ChoiceCards[i];
Card.ResetPosition();
_ChoiceCardText[i].text = "";
_ChoiceCardText[i].gameObject.SetActive(false);
Card.SetColourMaterial(_ChoiceCardColourOptions[Colour]);
Card.DisableInteractive = IsInVR;
VRCPickup Pickup = Card.GetComponent<VRCPickup>();
if (Pickup != null)
{
Pickup.pickupable = IsInVR;
}
}
_PCCardAnimator.SetBool("Turn Forward", false);
}
public int GetColourOptionsCount()
{
return _ChoiceCardColourOptions.Length;
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 53ded36b5511644438dd179343f93e5a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,287 @@
%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: PlayerPedestal
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: cf0528a56d98f904196dc5fd6ff9a6d0,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 0488c1879dee4d34cb20df436d804afe, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 4
hasInteractEvent: 0
scriptID: -7966647205400568113
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: 4
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _Pedestal
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Pedestal
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Transform, UnityEngine.CoreModule
- 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: 1
- Name:
Entry: 7
Data: 5|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: _SpawnPoint
- Name: $v
Entry: 7
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SpawnPoint
- Name: <UserType>k__BackingField
Entry: 9
Data: 3
- 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: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 8|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: _StandInteract
- Name: $v
Entry: 7
Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _StandInteract
- Name: <UserType>k__BackingField
Entry: 7
Data: 10|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.GameObject, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
- 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: 11|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 12|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: _PedestalHeight
- Name: $v
Entry: 7
Data: 13|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PedestalHeight
- 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: 3
Data: 1
- 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: 1
- Name:
Entry: 7
Data: 16|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: 13
Data:
- Name:
Entry: 8
Data:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c349502dacabed447b393fb564c5c6e5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,54 @@
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon.Common;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class PlayerPedestal : UdonSharpBehaviour
{
[SerializeField] private Transform _Pedestal;
[SerializeField] private Transform _SpawnPoint;
[SerializeField] private GameObject _StandInteract;
[UdonSynced] private float _PedestalHeight = 0.0f;
private const float MIN_AVATAR_EYE_HEIGHT = 0.745f;
public override void OnDeserialization(DeserializationResult result)
{
_AdjustHeight_Synced();
base.OnDeserialization(result);
}
public void AdjustHeight(VRCPlayerApi Player)
{
_PedestalHeight = Player.GetAvatarEyeHeightAsMeters();
_AdjustHeight_Synced();
RequestSerialization();
}
private void _AdjustHeight_Synced()
{
Vector3 ModifiedPosition = _Pedestal.localPosition;
ModifiedPosition.y = -Mathf.Clamp(
_PedestalHeight,
MIN_AVATAR_EYE_HEIGHT,
Networking.LocalPlayer.GetAvatarEyeHeightMaximumAsMeters());
_Pedestal.localPosition = ModifiedPosition;
}
public void EnableStandInteractLocally(bool Enable)
{
_StandInteract.SetActive(Enable);
}
public void StandInteract()
{
AdjustHeight(Networking.LocalPlayer);
Networking.LocalPlayer.TeleportTo(_SpawnPoint.position, _SpawnPoint.rotation);
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0488c1879dee4d34cb20df436d804afe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f496f0227e2a83f45a92a0939d497e21
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+378
View File
@@ -0,0 +1,378 @@
using UdonSharp;
using UnityEngine;
using TMPro;
using VRC.SDKBase;
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
using UnityEngine.UI;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class PlayerPodium : UdonSharpBehaviour
{
public int PlayerNumber = 0;
[SerializeField] private GameManagerRound1 _GameManager;
[SerializeField] private GameObject _TeleportButton;
[UdonSynced, FieldChangeCallback(nameof(PlayerName))] private string _PlayerName = "Player";
[UdonSynced] private int _PlayerID = -1;
[UdonSynced, FieldChangeCallback(nameof(PlayerScore))] private int _PlayerScore = 50;
[UdonSynced, FieldChangeCallback(nameof(ShowScoreCard))] private bool _ShowScoreCard = false;
[UdonSynced, FieldChangeCallback(nameof(FlashScoreboard))] private bool _FlashScoreboard = false;
[UdonSynced, FieldChangeCallback(nameof(EnableOwnershipTransfer))] private bool _EnableOwnershipTransfer = true;
[Space]
[Header("Objects")]
[SerializeField] private ChoiceCardGroup _ChoiceCards;
[SerializeField] private RiskCardGroup _RiskCards;
[SerializeField] private Buzzer _Buzzer;
[SerializeField] private PlayerPedestal _Pedestal;
[SerializeField] private VideoLoadIndicator _VideoLoadIndicator;
[SerializeField] private Transform _AuxiliaryVideoScreen;
[SerializeField] private Transform _AuxiliaryMapScreen;
[SerializeField] private CustomEventInteraction _OwnershipInteract;
[Space]
[Header("Effects")]
[SerializeField] private GameObject _HighlightEffect;
[SerializeField] private GameObject _ScorecardObject;
[SerializeField] private TextMeshProUGUI _NameplateUI;
[SerializeField] private TextMeshProUGUI _ScorecardUI;
[SerializeField] private Image _ScorecardBackground;
[Space]
[Header("Miscellaneous")]
[SerializeField] private Transform _SpawnPoint;
private int _FlashingScoreboardCounter = 0;
private const int MAX_FLASH_COUNTER = 8;
private const float FLASHING_SCOREBOARD_PERIOD = 0.15f;
void Start()
{
ResetPodium();
_Buzzer.SetGameManager(_GameManager);
}
public override void OnPlayerLeft(VRCPlayerApi Player)
{
if (Player.playerId == _PlayerID)
{
ResetOwner();
}
base.OnPlayerLeft(Player);
}
public override void OnAvatarEyeHeightChanged(VRCPlayerApi Player, float PrevEyeHeightAsMeters)
{
if (Player.playerId == _PlayerID)
{
_Pedestal.AdjustHeight(Player);
if (Player == Networking.LocalPlayer)
{
Player.TeleportTo(_SpawnPoint.position, _SpawnPoint.rotation);
}
}
base.OnAvatarEyeHeightChanged(Player, PrevEyeHeightAsMeters);
}
public void SetPlayerName()
{
if (_PlayerID != -1)
{
return;
}
Networking.SetOwner(Networking.LocalPlayer, gameObject);
Networking.SetOwner(Networking.LocalPlayer, _ChoiceCards.gameObject);
Networking.SetOwner(Networking.LocalPlayer, _RiskCards.gameObject);
Networking.SetOwner(Networking.LocalPlayer, _Buzzer.gameObject);
Networking.SetOwner(Networking.LocalPlayer, _Pedestal.gameObject);
Networking.SetOwner(Networking.LocalPlayer, _VideoLoadIndicator.gameObject);
Networking.SetOwner(Networking.LocalPlayer, _AuxiliaryVideoScreen.gameObject);
Networking.SetOwner(Networking.LocalPlayer, _AuxiliaryMapScreen.gameObject);
PlayerName = Networking.LocalPlayer.displayName;
_PlayerID = Networking.LocalPlayer.playerId;
_Pedestal.EnableStandInteractLocally(true);
_Pedestal.AdjustHeight(Networking.LocalPlayer);
EnableOwnershipTransfer = false;
RequestSerialization();
}
[NetworkCallable]
public void ResetOwner()
{
PlayerName = "Player " + PlayerNumber;
_PlayerID = -1;
_Pedestal.EnableStandInteractLocally(false);
EnableOwnershipTransfer = true;
RequestSerialization();
}
public int GetPlayerID() { return _PlayerID; }
[NetworkCallable]
public void DisplayScore()
{
ShowScoreCard = true;
RequestSerialization();
}
private void _DisplayScorecardObject(bool Show)
{
_ScorecardObject.SetActive(Show);
}
[NetworkCallable]
public void ResetPodium()
{
ResetOwner();
EnableChoiceCards(false, 0);
EnableBuzzer(false);
HighlightPodium(false);
ShowAuxiliaryVideoScreen(false);
ShowAuxiliaryMapScreen(false);
PlayerScore = 50;
ShowScoreCard = false;
}
public void DecreaseScoreBy5()
{
PlayerScore -= 5;
RequestSerialization();
}
public void IncreaseScoreBy5()
{
PlayerScore += 5;
RequestSerialization();
}
[NetworkCallable]
public void AdjustScore(int Adjustment)
{
PlayerScore += Adjustment;
RequestSerialization();
}
[NetworkCallable]
public void EnableChoiceCards(bool Enable, int ColourChoice)
{
_ChoiceCards.gameObject.SetActive(Enable);
_ChoiceCards.ResetCards(ColourChoice);
_ChoiceCards.SendCustomNetworkEvent(NetworkEventTarget.Owner, "MakeChoiceTextVisible");
}
[NetworkCallable]
public void SetCardChoices(string[] Choices, int[] Indices)
{
_ChoiceCards.SetChoices(Choices, Indices);
}
[NetworkCallable]
public void LockInChoice()
{
_ChoiceCards.LockInChoice();
_ChoiceCards.SendCustomNetworkEvent(NetworkEventTarget.All, "MakeChoiceTextVisible");
}
public bool VerifyMultipleChoiceResponse(int CorrectResponse)
{
bool IsCorrectResponse = _ChoiceCards.GetSelectedChoice() == CorrectResponse;
if (IsCorrectResponse)
{
SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(AdjustScore), 10);
}
return IsCorrectResponse;
}
public int GetColourOptionsCount()
{
return _ChoiceCards.GetColourOptionsCount();
}
[NetworkCallable]
public void EnableRiskCards(bool Enable)
{
_RiskCards.gameObject.SetActive(Enable);
_RiskCards.ResetCards();
_RiskCards.SendCustomNetworkEvent(NetworkEventTarget.Owner, "MakeRiskTextVisible");
}
[NetworkCallable]
public void LockInRisk()
{
_RiskCards.LockInChoice();
_RiskCards.SendCustomNetworkEvent(NetworkEventTarget.All, "MakeRiskTextVisible");
}
[NetworkCallable]
public void VerifyFinalRoundResponse(int CorrectResponse)
{
if (_ChoiceCards.GetSelectedChoice() == CorrectResponse)
{
SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(AdjustScore), _RiskCards.GetSelectedChoice());
}
else
{
SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(AdjustScore), -_RiskCards.GetSelectedChoice());
}
}
[NetworkCallable]
public void EnableBuzzer(bool Enable)
{
_Buzzer.gameObject.SetActive(Enable);
_Buzzer.transform.localPosition = Vector3.zero;
_Buzzer.transform.localEulerAngles = Vector3.zero;
}
[NetworkCallable]
public void StartBuzzedInEffect()
{
FlashScoreboard = true;
RequestSerialization();
}
public void TickFlashingScoreboard()
{
if (_FlashingScoreboardCounter < MAX_FLASH_COUNTER)
{
_FlashingScoreboardCounter++;
switch (_FlashingScoreboardCounter % 2)
{
case 1:
InvertScoreboardColours();
break;
case 0:
default:
ResetScoreboardColours();
break;
}
SendCustomEventDelayedSeconds(nameof(TickFlashingScoreboard), FLASHING_SCOREBOARD_PERIOD);
}
else {
ResetScoreboardColours();
_FlashingScoreboardCounter = 0;
FlashScoreboard = false;
}
}
private void InvertScoreboardColours()
{
_ScorecardUI.color = Color.black;
_ScorecardBackground.color = Color.white;
}
private void ResetScoreboardColours()
{
_ScorecardUI.color = Color.white;
_ScorecardBackground.color = Color.black;
}
public void HighlightPodium(bool Highlight)
{
_HighlightEffect.SetActive(Highlight);
}
[NetworkCallable]
public void ShowAuxiliaryVideoScreen(bool Show)
{
Vector3 LocalPosition = _AuxiliaryVideoScreen.localPosition;
_AuxiliaryVideoScreen.localPosition = new Vector3(LocalPosition.x, Show ? 0.0f : -1000.0f, LocalPosition.z);
}
[NetworkCallable]
public void ShowAuxiliaryMapScreen(bool Show)
{
Vector3 LocalPosition = _AuxiliaryMapScreen.localPosition;
_AuxiliaryMapScreen.localPosition = new Vector3(LocalPosition.x, Show ? 0.0f : -1000.0f, LocalPosition.z);
}
public string PlayerName
{
set
{
_PlayerName = value;
_NameplateUI.text = value;
}
get => _PlayerName;
}
public int PlayerScore
{
set
{
_PlayerScore = value;
_ScorecardUI.text = PlayerScore.ToString();
}
get => _PlayerScore;
}
public bool ShowScoreCard
{
set
{
_ShowScoreCard = value;
_DisplayScorecardObject(value);
}
get => _ShowScoreCard;
}
public bool FlashScoreboard
{
set
{
_FlashScoreboard = value;
if (_FlashScoreboard)
{
TickFlashingScoreboard();
}
else
{
_FlashingScoreboardCounter = 0;
}
}
get => _FlashScoreboard;
}
private bool EnableOwnershipTransfer
{
set
{
_EnableOwnershipTransfer = value;
_OwnershipInteract.gameObject.SetActive(_EnableOwnershipTransfer);
_TeleportButton.SetActive(_EnableOwnershipTransfer);
}
get => _EnableOwnershipTransfer;
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d8b1d1f3fc4fd944795d9342360a337f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,386 @@
%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: PlayerPodiumRound2
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 1548db13d1977224aa7171bcdc754e70,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 0458afc6c10ba344f8af219c2363ee74, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 4
hasInteractEvent: 0
scriptID: 4574133401894560858
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: _PlayerName
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PlayerName
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.String, mscorlib
- 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: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 5|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: _EnableOwnershipInteract
- Name: $v
Entry: 7
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _EnableOwnershipInteract
- Name: <UserType>k__BackingField
Entry: 7
Data: 7|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean, mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 7
- 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: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 9|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: _Pedestal
- Name: $v
Entry: 7
Data: 10|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Pedestal
- Name: <UserType>k__BackingField
Entry: 7
Data: 11|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: PlayerPedestal, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 12|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: 13|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 14|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: Objects
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 15|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: _OwnershipTransferInteract
- Name: $v
Entry: 7
Data: 16|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _OwnershipTransferInteract
- Name: <UserType>k__BackingField
Entry: 7
Data: 17|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.GameObject, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 17
- 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: 1
- Name:
Entry: 7
Data: 19|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: _SpawnPoint
- Name: $v
Entry: 7
Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SpawnPoint
- Name: <UserType>k__BackingField
Entry: 7
Data: 21|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Transform, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 21
- 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: 22|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 3
- Name:
Entry: 7
Data: 23|UnityEngine.SpaceAttribute, UnityEngine.CoreModule
- Name: height
Entry: 4
Data: 8
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 24|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: Miscellaneous
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 25|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:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 40b99369e8458d7408b92200300fafcb
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,145 @@
using UdonSharp;
using UnityEngine;
using VRC.SDK3.UdonNetworkCalling;
using VRC.SDKBase;
using VRC.Udon.Common;
using VRC.Udon.Common.Interfaces;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class PlayerPodiumRound2 : UdonSharpBehaviour
{
[UdonSynced] private string _PlayerName = "";
[UdonSynced] private bool _EnableOwnershipInteract = false;
[Header("Objects")]
[SerializeField] private PlayerPedestal _Pedestal;
[SerializeField] private GameObject _OwnershipTransferInteract;
[Space]
[Header("Miscellaneous")]
[SerializeField] private Transform _SpawnPoint;
public override void OnDeserialization(DeserializationResult Result)
{
_SetPlayer_Synced();
base.OnDeserialization(Result);
}
public override void OnPlayerLeft(VRCPlayerApi Player)
{
if (Player.displayName == _PlayerName)
{
ResetOwner(true);
}
base.OnPlayerLeft(Player);
}
public override void OnAvatarEyeHeightChanged(VRCPlayerApi Player, float PrevEyeHeightAsMeters)
{
if (Player.displayName == _PlayerName)
{
_Pedestal.AdjustHeight(Player);
if (Player == Networking.LocalPlayer)
{
Player.TeleportTo(_SpawnPoint.position, _SpawnPoint.rotation);
}
}
base.OnAvatarEyeHeightChanged(Player, PrevEyeHeightAsMeters);
}
public bool SetPlayer(string Player, bool EnableOwnershipInteract = false)
{
VRCPlayerApi[] Players = new VRCPlayerApi[VRCPlayerApi.GetPlayerCount()];
VRCPlayerApi.GetPlayers(Players);
for (int i = 0; i < Players.Length; i++)
{
VRCPlayerApi PlayerObject = Players[i];
if (PlayerObject != null && PlayerObject.displayName == Player)
{
Networking.SetOwner(PlayerObject, gameObject);
Networking.SetOwner(PlayerObject, _Pedestal.gameObject);
SendCustomNetworkEvent(NetworkEventTarget.Owner,
nameof(SetPlayer_NetworkCallable), EnableOwnershipInteract);
return true;
}
}
_PlayerName = "";
_EnableOwnershipInteract = true;
ResetOwner();
return false;
}
[NetworkCallable]
public void SetPlayer_NetworkCallable(bool EnableOwnershipInteract)
{
_PlayerName = Networking.LocalPlayer.displayName;
_EnableOwnershipInteract = EnableOwnershipInteract;
_Pedestal.EnableStandInteractLocally(true);
_Pedestal.AdjustHeight(Networking.LocalPlayer);
_SetPlayer_Synced();
RequestSerialization();
}
private void _SetPlayer_Synced()
{
_EnableOwnershipInteract_Synced();
}
public bool SetPlayerToLocal()
{
return SetPlayer(Networking.LocalPlayer.displayName);
}
public void EnableOwnershipInteract(bool Enable)
{
_EnableOwnershipInteract = Enable;
RequestSerialization();
}
private void _EnableOwnershipInteract_Synced()
{
_OwnershipTransferInteract.SetActive(_PlayerName == "" && _EnableOwnershipInteract);
}
public void ResetOwner(bool EnableOwnershipInteract = false)
{
SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(ResetOwner_NetworkCallable), EnableOwnershipInteract);
}
[NetworkCallable]
public void ResetOwner_NetworkCallable(bool EnableOwnershipInteract)
{
_PlayerName = "";
_EnableOwnershipInteract = EnableOwnershipInteract;
_Pedestal.EnableStandInteractLocally(false);
_OwnershipTransferInteract.SetActive(_EnableOwnershipInteract);
RequestSerialization();
}
public void ResetPodium(bool EnableOwnershipInteract = false)
{
SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(ResetPodium_NetworkCallable));
}
[NetworkCallable]
public void ResetPodium_NetworkCallable(bool EnableOwnershipInteract)
{
ResetOwner_NetworkCallable(EnableOwnershipInteract);
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0458afc6c10ba344f8af219c2363ee74
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+467
View File
@@ -0,0 +1,467 @@
%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: RiskCard
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 8e0a7c5c334a8cc458943f9290dd7903,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 13dcfdcf86a283d43b82280c52b3febd, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 4
hasInteractEvent: 1
scriptID: 26508076278105151
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: 7
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: RiskAmount
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: RiskAmount
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32, mscorlib
- 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: 3
Data: 1
- 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: 1
- Name:
Entry: 7
Data: 5|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: CardGroup
- Name: $v
Entry: 7
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: CardGroup
- Name: <UserType>k__BackingField
Entry: 7
Data: 7|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: RiskCardGroup, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 8|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: 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: _Holder
- Name: $v
Entry: 7
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Holder
- Name: <UserType>k__BackingField
Entry: 7
Data: 12|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Collider, UnityEngine.PhysicsModule
- 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: 1
- Name:
Entry: 7
Data: 14|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: _RiskCardText
- Name: $v
Entry: 7
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RiskCardText
- Name: <UserType>k__BackingField
Entry: 7
Data: 16|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 16
- 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: 17|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 18|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: _SpawnPosition
- Name: $v
Entry: 7
Data: 19|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SpawnPosition
- Name: <UserType>k__BackingField
Entry: 7
Data: 20|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Transform, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 20
- 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: 21|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 22|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: _HeldPosition
- Name: $v
Entry: 7
Data: 23|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _HeldPosition
- Name: <UserType>k__BackingField
Entry: 9
Data: 20
- Name: <SystemType>k__BackingField
Entry: 9
Data: 20
- 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: 24|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 25|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: _IsInHeldCollider
- Name: $v
Entry: 7
Data: 26|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _IsInHeldCollider
- Name: <UserType>k__BackingField
Entry: 7
Data: 27|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean, mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 27
- 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: 28|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:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2b4c49fd5a9bf174486b5139a6c7850c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+91
View File
@@ -0,0 +1,91 @@
using TMPro;
using UdonSharp;
using UnityEngine;
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class RiskCard : UdonSharpBehaviour
{
[UdonSynced] public int RiskAmount = 0;
[SerializeField] private RiskCardGroup CardGroup = null;
[SerializeField] private Collider _Holder;
[SerializeField] private TextMeshProUGUI _RiskCardText;
[SerializeField] private Transform _SpawnPosition;
[SerializeField] private Transform _HeldPosition;
private bool _IsInHeldCollider = false;
void Start()
{
_RiskCardText.text = RiskAmount.ToString();
}
void OnTriggerEnter(Collider OtherCollider)
{
if (OtherCollider == _Holder)
{
_IsInHeldCollider = true;
}
}
private void OnTriggerExit(Collider OtherCollider)
{
if (OtherCollider == _Holder)
{
_IsInHeldCollider = false;
}
}
public override void OnPickup()
{
CardGroup.SendCustomNetworkEvent(NetworkEventTarget.All, "RiskCardPickedUp", RiskAmount);
base.OnPickup();
}
public override void Interact()
{
CardGroup.SendCustomNetworkEvent(NetworkEventTarget.All, "RiskCardInteract", RiskAmount);
base.Interact();
}
public override void OnDrop()
{
if (_IsInHeldCollider)
{
transform.position = _Holder.transform.position;
transform.rotation = _Holder.transform.rotation;
}
base.OnDrop();
}
public void SetCardGroup(RiskCardGroup ParentCardGroup)
{
CardGroup = ParentCardGroup;
}
[NetworkCallable]
public void SetToHeldPosition()
{
transform.SetParent(_HeldPosition, false);
transform.localPosition = Vector3.zero;
transform.localEulerAngles = Vector3.zero;
InteractionText = "Reveal";
}
[NetworkCallable]
public void ResetPosition()
{
transform.SetParent(_SpawnPosition, false);
transform.localPosition = Vector3.zero;
transform.localEulerAngles = Vector3.zero;
InteractionText = "Choose";
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 13dcfdcf86a283d43b82280c52b3febd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,425 @@
%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: RiskCardGroup
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: f06468f049786fc449f3579293521d6d,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: e275fba2e540b3141aaca5bcef2d0c43, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 4
hasInteractEvent: 0
scriptID: 6695155412467949124
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: 6
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _Podium
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Podium
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: PlayerPodium, 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: _RiskCards
- Name: $v
Entry: 7
Data: 7|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RiskCards
- Name: <UserType>k__BackingField
Entry: 7
Data: 8|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: RiskCard[], Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 9|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Component[], UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 10|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 11|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: _RiskCardText
- Name: $v
Entry: 7
Data: 12|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RiskCardText
- Name: <UserType>k__BackingField
Entry: 7
Data: 13|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI[], Unity.TextMeshPro
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 13
- 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: 14|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 15|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: _PCCardHeldPosition
- Name: $v
Entry: 7
Data: 16|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PCCardHeldPosition
- Name: <UserType>k__BackingField
Entry: 7
Data: 17|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.GameObject, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 17
- 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: 1
- Name:
Entry: 7
Data: 19|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: _PCCardAnimator
- Name: $v
Entry: 7
Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PCCardAnimator
- Name: <UserType>k__BackingField
Entry: 7
Data: 21|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Animator, UnityEngine.AnimationModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 21
- 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: 22|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 23|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: _SelectedRiskAmount
- Name: $v
Entry: 7
Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SelectedRiskAmount
- Name: <UserType>k__BackingField
Entry: 7
Data: 25|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32, mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 25
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 26|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 27|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8199bd7fd1968ce44bd65bc349c4df69
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+167
View File
@@ -0,0 +1,167 @@
using TMPro;
using UdonSharp;
using UnityEngine;
using VRC.SDK3.Components;
using VRC.SDK3.UdonNetworkCalling;
using VRC.SDKBase;
using VRC.Udon.Common.Interfaces;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class RiskCardGroup : UdonSharpBehaviour
{
[SerializeField] private PlayerPodium _Podium;
[SerializeField] private RiskCard[] _RiskCards;
[SerializeField] private TextMeshProUGUI[] _RiskCardText;
[SerializeField] private GameObject _PCCardHeldPosition;
[SerializeField] private Animator _PCCardAnimator;
[UdonSynced] private int _SelectedRiskAmount = -1;
void Start()
{
for (int i = 0; i < _RiskCards.Length; i++)
{
RiskCard Card = _RiskCards[i];
Card.SetCardGroup(this);
}
}
[NetworkCallable]
public void RiskCardPickedUp(int RiskAmount)
{
_SelectedRiskAmount = RiskAmount;
}
[NetworkCallable]
public void RiskCardInteract(int RiskAmount)
{
if (_SelectedRiskAmount == RiskAmount)
{
RevealChoice();
return;
}
_SelectedRiskAmount = RiskAmount;
VRCPlayerApi Player = Networking.GetOwner(_Podium.gameObject);
Debug.Assert(Player != null);
for (int i = 0; i < _RiskCards.Length; i++)
{
RiskCard Card = _RiskCards[i];
_PCCardAnimator.SetBool("Turn Forward", false);
Card.DisableInteractive = false;
if (Card.RiskAmount == _SelectedRiskAmount)
{
if (!Player.IsUserInVR())
{
Card.SendCustomNetworkEvent(NetworkEventTarget.All, "SetToHeldPosition");
Card.DisableInteractive = true;
}
}
else
{
Card.ResetPosition();
}
}
}
private void RevealChoice()
{
VRCPlayerApi Player = Networking.GetOwner(_Podium.gameObject);
if (Player != null && !Player.IsUserInVR())
{
for (int i = 0; i < _RiskCards.Length; i++)
{
RiskCard Card = _RiskCards[i];
if (Card.RiskAmount == _SelectedRiskAmount)
{
VRCPickup Pickup = Card.GetComponent<VRCPickup>();
if (Pickup != null)
{
Pickup.Drop();
}
Card.SendCustomNetworkEvent(NetworkEventTarget.All, "SetToHeldPosition");
_PCCardAnimator.SetBool("Turn Forward", true);
Card.DisableInteractive = true;
}
else
{
Card.ResetPosition();
}
}
}
}
public int GetSelectedChoice()
{
return (_SelectedRiskAmount < 0) ? 0 : _SelectedRiskAmount;
}
[NetworkCallable]
public void MakeRiskTextVisible()
{
for (int i = 0; i < _RiskCards.Length && i < _RiskCardText.Length; i++)
{
_RiskCardText[i].gameObject.SetActive(true);
}
}
public void LockInChoice()
{
for (int i = 0; i < _RiskCards.Length; i++)
{
RiskCard Card = _RiskCards[i];
if (Card.RiskAmount == _SelectedRiskAmount)
{
Card.DisableInteractive = false;
}
else
{
Card.DisableInteractive = true;
VRCPickup Pickup = Card.GetComponent<VRCPickup>();
if (Pickup != null)
{
Pickup.pickupable = false;
}
}
}
}
public void ResetCards()
{
_SelectedRiskAmount = -1;
VRCPlayerApi Player = Networking.GetOwner(_Podium.gameObject);
Debug.Assert(Player != null);
bool IsInVR = Player.IsUserInVR();
for (int i = 0; i < _RiskCards.Length; i++)
{
RiskCard Card = _RiskCards[i];
Card.ResetPosition();
_RiskCardText[i].gameObject.SetActive(false);
Card.DisableInteractive = IsInVR;
VRCPickup Pickup = Card.GetComponent<VRCPickup>();
if (Pickup != null)
{
Pickup.pickupable = IsInVR;
}
}
_PCCardAnimator.SetBool("Turn Forward", false);
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e275fba2e540b3141aaca5bcef2d0c43
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,53 @@
%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: RiskCardHolder
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 55879270d8d2bd2448aa0fd442ff3062,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 8c5c9c0099baba047a5672fe5f733eeb, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 4
hasInteractEvent: 0
scriptID: 7902799765129343202
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: 0
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5ee671b124e44f9479db21be2e10cf42
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,12 @@
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class RiskCardHolder : UdonSharpBehaviour
{
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8c5c9c0099baba047a5672fe5f733eeb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: