Risk cards are partly implemented.

This commit is contained in:
Jamie Greunbaum
2025-06-08 03:13:33 -04:00
parent 232108a0ec
commit 0bb3036c53
63 changed files with 4385 additions and 297 deletions
+113
View File
@@ -0,0 +1,113 @@
%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: 1
- 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: 13
Data:
- Name:
Entry: 8
Data:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e84e4204e73a6414e8a5c10d7862d8be
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+23
View File
@@ -0,0 +1,23 @@
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;
public override void OnPickupUseDown()
{
VRCPlayerApi LocalPlayer = Networking.LocalPlayer;
if (Podium.GetPlayerID() == LocalPlayer.playerId)
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)Podium.GameManager, NetworkEventTarget.All, "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:
+293
View File
@@ -0,0 +1,293 @@
%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: 4
- 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: _SpawnPosition
- Name: $v
Entry: 7
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SpawnPosition
- Name: <UserType>k__BackingField
Entry: 7
Data: 12|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Transform, 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: _HeldPosition
- Name: $v
Entry: 7
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _HeldPosition
- Name: <UserType>k__BackingField
Entry: 9
Data: 12
- 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: 16|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 17|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:
+52
View File
@@ -0,0 +1,52 @@
using UdonSharp;
using UdonSharp.Examples.Utilities;
using UnityEditor;
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 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;
}
[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,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: 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: 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: _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: _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: _SelectedChoice
- Name: $v
Entry: 7
Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SelectedChoice
- 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: e3674ffb69c83514c8e3993fbfd8371c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+170
View File
@@ -0,0 +1,170 @@
using TMPro;
using UdonSharp;
using UnityEngine;
using VRC.SDK3.Components;
using VRC.SDK3.Data;
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 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()
{
_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.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: 53ded36b5511644438dd179343f93e5a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+830
View File
@@ -0,0 +1,830 @@
%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: PlayerPodium
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 6028bca03a297954d82bbb15d0cc4f26,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: d8b1d1f3fc4fd944795d9342360a337f, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 4
hasInteractEvent: 0
scriptID: 1952056610188226402
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: 13
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: PlayerNumber
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: PlayerNumber
- 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: 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: GameManager
- Name: $v
Entry: 7
Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: GameManager
- Name: <UserType>k__BackingField
Entry: 7
Data: 6|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: GameManager, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 7|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: 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: 7
Data:
- Name: $k
Entry: 1
Data: _PlayerName
- Name: $v
Entry: 7
Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PlayerName
- Name: <UserType>k__BackingField
Entry: 7
Data: 10|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.String, mscorlib
- 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: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 11|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 12|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 13|UdonSharp.FieldChangeCallbackAttribute, 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: _PlayerID
- Name: $v
Entry: 7
Data: 14|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PlayerID
- 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: 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: 7
Data:
- Name: $k
Entry: 1
Data: _PlayerScore
- Name: $v
Entry: 7
Data: 17|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PlayerScore
- 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: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 18|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 19|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 20|UdonSharp.FieldChangeCallbackAttribute, 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: _ShowScoreCard
- Name: $v
Entry: 7
Data: 21|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ShowScoreCard
- Name: <UserType>k__BackingField
Entry: 7
Data: 22|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean, mscorlib
- Name:
Entry: 8
Data:
- 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: 23|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 24|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 25|UdonSharp.FieldChangeCallbackAttribute, 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: _ChoiceCards
- Name: $v
Entry: 7
Data: 26|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ChoiceCards
- Name: <UserType>k__BackingField
Entry: 7
Data: 27|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: ChoiceCardGroup, Assembly-CSharp
- 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: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 28|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 29|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: 30|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RiskCards
- Name: <UserType>k__BackingField
Entry: 7
Data: 31|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: RiskCardGroup, Assembly-CSharp
- 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: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- 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|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _Buzzer
- Name: $v
Entry: 7
Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Buzzer
- Name: <UserType>k__BackingField
Entry: 7
Data: 35|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: Buzzer, Assembly-CSharp
- 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: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 36|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 37|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _BuzzedInEffect
- Name: $v
Entry: 7
Data: 38|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _BuzzedInEffect
- Name: <UserType>k__BackingField
Entry: 7
Data: 39|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.GameObject, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 39
- 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: 40|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 41|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: Effects
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 42|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: _ScorecardObject
- Name: $v
Entry: 7
Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ScorecardObject
- Name: <UserType>k__BackingField
Entry: 9
Data: 39
- Name: <SystemType>k__BackingField
Entry: 9
Data: 39
- 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: 44|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 45|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: _NameplateUI
- Name: $v
Entry: 7
Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _NameplateUI
- Name: <UserType>k__BackingField
Entry: 7
Data: 47|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 47
- 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: 48|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 49|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: _ScorecardUI
- Name: $v
Entry: 7
Data: 50|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ScorecardUI
- Name: <UserType>k__BackingField
Entry: 9
Data: 47
- Name: <SystemType>k__BackingField
Entry: 9
Data: 47
- 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: 51|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 52|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: f496f0227e2a83f45a92a0939d497e21
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+231
View File
@@ -0,0 +1,231 @@
using UdonSharp;
using UnityEngine;
using TMPro;
using VRC.SDKBase;
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
using VRC.Udon.Common;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class PlayerPodium : UdonSharpBehaviour
{
public int PlayerNumber = 0;
public GameManager GameManager;
[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;
[SerializeField] private ChoiceCardGroup _ChoiceCards;
[SerializeField] private RiskCardGroup _RiskCards;
[SerializeField] private Buzzer _Buzzer;
[Header("Effects")]
[SerializeField] private GameObject _BuzzedInEffect;
[SerializeField] private GameObject _ScorecardObject;
[SerializeField] private TextMeshProUGUI _NameplateUI;
[SerializeField] private TextMeshProUGUI _ScorecardUI;
void Start()
{
ResetPodium();
}
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);
PlayerName = Networking.LocalPlayer.displayName;
_PlayerID = Networking.LocalPlayer.playerId;
RequestSerialization();
}
[NetworkCallable]
public void ResetOwner()
{
Networking.SetOwner(Networking.InstanceOwner, gameObject);
Networking.SetOwner(Networking.InstanceOwner, _ChoiceCards.gameObject);
Networking.SetOwner(Networking.InstanceOwner, _RiskCards.gameObject);
Networking.SetOwner(Networking.InstanceOwner, _Buzzer.gameObject);
PlayerName = "Player " + PlayerNumber;
_PlayerID = -1;
}
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);
EnableBuzzer(false);
EnableBuzzInEffect(false);
PlayerScore = 50;
ShowScoreCard = false;
}
[NetworkCallable]
public void DecreaseScoreBy5()
{
PlayerScore -= 5;
}
[NetworkCallable]
public void IncreaseScoreBy5()
{
PlayerScore += 5;
}
[NetworkCallable]
public void AdjustScore(int Adjustment)
{
PlayerScore += Adjustment;
}
[NetworkCallable]
public void EnableChoiceCards(bool Enable)
{
_ChoiceCards.gameObject.SetActive(Enable);
_ChoiceCards.ResetCards();
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)_ChoiceCards,
NetworkEventTarget.Owner,
"MakeChoiceTextVisible");
}
[NetworkCallable]
public void SetCardChoices(string[] Choices, int[] Indices)
{
_ChoiceCards.SetChoices(Choices, Indices);
}
[NetworkCallable]
public void LockInChoice()
{
_ChoiceCards.LockInChoice();
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)_ChoiceCards,
NetworkEventTarget.All,
"MakeChoiceTextVisible");
}
[NetworkCallable]
public void VerifyMultipleChoiceResponse(int CorrectResponse)
{
if (_ChoiceCards.GetSelectedChoice() == CorrectResponse)
{
AdjustScore(10);
}
}
[NetworkCallable]
public void EnableRiskCards(bool Enable)
{
_RiskCards.gameObject.SetActive(Enable);
_RiskCards.ResetCards();
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)_RiskCards,
NetworkEventTarget.Owner,
"MakeRiskTextVisible");
}
[NetworkCallable]
public void LockInRisk()
{
_RiskCards.LockInChoice();
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)_RiskCards,
NetworkEventTarget.All,
"MakeRiskTextVisible");
}
[NetworkCallable]
public void VerifyFinalRoundResponse(int CorrectResponse)
{
if (_ChoiceCards.GetSelectedChoice() == CorrectResponse)
{
AdjustScore(_RiskCards.GetSelectedChoice());
}
else
{
AdjustScore(-_RiskCards.GetSelectedChoice());
}
}
[NetworkCallable]
public void EnableBuzzer(bool Enable)
{
_Buzzer.gameObject.SetActive(Enable);
}
[NetworkCallable]
public void EnableBuzzInEffect(bool Enable)
{
_BuzzedInEffect.SetActive(Enable);
}
public string PlayerName
{
set
{
_PlayerName = value;
_NameplateUI.text = value;
}
get => _PlayerName;
}
public int PlayerScore
{
set
{
_PlayerScore = value;
_ScorecardUI.text = PlayerScore.ToString();
RequestSerialization();
}
get => _PlayerScore;
}
public bool ShowScoreCard
{
set
{
_ShowScoreCard = value;
_DisplayScorecardObject(value);
}
get => _ShowScoreCard;
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d8b1d1f3fc4fd944795d9342360a337f
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: 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: 5
- 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: _RiskCardText
- Name: $v
Entry: 7
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RiskCardText
- Name: <UserType>k__BackingField
Entry: 7
Data: 12|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
- 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: 2b4c49fd5a9bf174486b5139a6c7850c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+58
View File
@@ -0,0 +1,58 @@
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 TextMeshProUGUI _RiskCardText;
[SerializeField] private Transform _SpawnPosition;
[SerializeField] private Transform _HeldPosition;
void Start()
{
_RiskCardText.text = RiskAmount.ToString();
}
public override void OnPickup()
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)CardGroup, NetworkEventTarget.All, "RiskCardPickedUp", RiskAmount);
}
public override void Interact()
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)CardGroup, NetworkEventTarget.All, "RiskCardInteract", RiskAmount);
}
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:
+425
View File
@@ -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:
+159
View File
@@ -0,0 +1,159 @@
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 = 0;
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())
{
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 < _RiskCards.Length; i++)
{
RiskCard Card = _RiskCards[i];
if (Card.RiskAmount == _SelectedRiskAmount)
{
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 _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; continue; }
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].text = "";
_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: