Choice cards now cycle colours on every new question.

This commit is contained in:
Jamie Greunbaum 2025-09-05 20:02:30 -04:00
parent cfd9defc1f
commit 6ca24773b0
30 changed files with 246 additions and 386 deletions

Binary file not shown.

Binary file not shown.

View File

@ -363,6 +363,7 @@ MonoBehaviour:
_udonSharpBackingUdonBehaviour: {fileID: 7847633811780037068}
ChoiceNumber: 1
CardGroup: {fileID: 0}
_Mesh: {fileID: 8103913657558548278}
_SpawnPosition: {fileID: 0}
_HeldPosition: {fileID: 0}
--- !u!1001 &7473573123876725682
@ -449,3 +450,9 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 7473573123876725682}
m_PrefabAsset: {fileID: 0}
--- !u!23 &8103913657558548278 stripped
MeshRenderer:
m_CorrespondingSourceObject: {fileID: -7511558181221131132, guid: 43a698f97137dae40adf4b6dfffa5e41,
type: 3}
m_PrefabInstance: {fileID: 7473573123876725682}
m_PrefabAsset: {fileID: 0}

View File

@ -951,6 +951,11 @@ MonoBehaviour:
- {fileID: 4583055032373359887}
- {fileID: 1542133310407370963}
- {fileID: 2774508140835993176}
_ChoiceCardColourOptions:
- {fileID: 2100000, guid: 2c0cd617d97924748a9d5e2eeb2039b5, type: 2}
- {fileID: 2100000, guid: 1eb2f964062497347b887d2c940e79c5, type: 2}
- {fileID: 2100000, guid: e3bf0e4e3864c2149b48a821a799c6f4, type: 2}
- {fileID: 2100000, guid: 68d52ca36879f8942ab6e0fb16fe541d, type: 2}
_PCCardHeldPosition: {fileID: 2509325258865248374}
_PCCardAnimator: {fileID: 3292427936088400333}
--- !u!114 &8462795151643791661
@ -1822,7 +1827,7 @@ BoxCollider:
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 0.78, y: 1.05, z: 0.55}
m_Size: {x: 0.74, y: 1.01, z: 0.51}
m_Center: {x: 0, y: 0.5, z: -0.25}
--- !u!114 &2288460166211710674
MonoBehaviour:
@ -1978,8 +1983,8 @@ BoxCollider:
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
m_Size: {x: 1, y: 1, z: 0.75}
m_Center: {x: 0, y: 0, z: 0.125}
--- !u!1 &8581031651934048616
GameObject:
m_ObjectHideFlags: 0

View File

@ -79494,39 +79494,39 @@ MonoBehaviour:
useAssignedLayers: 0
DynamicPrefabs: []
DynamicMaterials:
- {fileID: 2100000, guid: accd304c49b7d6d43b97738e8e118342, type: 2}
- {fileID: 2100000, guid: 2c0cd617d97924748a9d5e2eeb2039b5, type: 2}
- {fileID: 2100000, guid: c1b531b2f1a7dab43b46daa7546cfda7, type: 2}
- {fileID: 2100000, guid: 0c3dfdcd7a2a6ac408ec3d431f9a4932, type: 2}
- {fileID: 2100000, guid: e45d02bbf7268504ca58513c548a58e7, type: 2}
- {fileID: 2100000, guid: 9cdc0250a4c9b534fae68ae6aa90bf31, type: 2}
- {fileID: 2100000, guid: dba163de40c568b48ae2ffa7c83c66b9, type: 2}
- {fileID: 2100000, guid: af0c1cbaaffed304ba0e3a1fbac41e7e, type: 2}
- {fileID: 2100000, guid: cc22c7f9de95cab4488b30fe8699a82a, type: 2}
- {fileID: 2100000, guid: fe872fb72ad98da4dbb868481468e848, type: 2}
- {fileID: 2100000, guid: 4fb0b8cdca56f5d47be970c7490cb7a1, type: 2}
- {fileID: 2100000, guid: 348ff3cc54305654d9eeebbbb385c262, type: 2}
- {fileID: 2100000, guid: 82f2961c9baa48a45ac897be257fd655, type: 2}
- {fileID: 2100000, guid: 9cdc0250a4c9b534fae68ae6aa90bf31, type: 2}
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 2100000, guid: 0c3dfdcd7a2a6ac408ec3d431f9a4932, type: 2}
- {fileID: 2100000, guid: 71fff76911e92ab43a71d15602da4c4b, type: 2}
- {fileID: 2100000, guid: 35c2a316ece610b4b963e047e5238337, type: 2}
- {fileID: 2100000, guid: 20b7b61cb65ead644a4959264fc90833, type: 2}
- {fileID: 2100000, guid: c1b531b2f1a7dab43b46daa7546cfda7, type: 2}
- {fileID: 2100000, guid: accd304c49b7d6d43b97738e8e118342, type: 2}
- {fileID: 2100000, guid: 2c0cd617d97924748a9d5e2eeb2039b5, type: 2}
- {fileID: 2100000, guid: 4c14b2f4b9a613f418bb1e6cf8cf68f4, type: 2}
- {fileID: 2100000, guid: cf2685410a4f72447a34ea1791a70a1c, type: 2}
- {fileID: 2100000, guid: c3186340e03d26341969d34663dbf8f3, type: 2}
- {fileID: 2100000, guid: 6dd6b8b1c8133f04dbc23ac81f5dfded, type: 2}
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 2100000, guid: ea08301eace4f164bb3aae930413a978, type: 2}
- {fileID: 2100000, guid: 97a375a2664a65f44a74b8e0711591fb, type: 2}
- {fileID: 2100000, guid: 348ff3cc54305654d9eeebbbb385c262, type: 2}
- {fileID: 2100000, guid: a793cd1d5fe89c440900d816c7b8c323, type: 2}
- {fileID: 2100000, guid: dba163de40c568b48ae2ffa7c83c66b9, type: 2}
- {fileID: 2100000, guid: cac39def7281c5c488b6a3465ec1951b, type: 2}
- {fileID: 2100000, guid: e45d02bbf7268504ca58513c548a58e7, type: 2}
- {fileID: 2100000, guid: 98166ed003d332e488319f662c3b4429, type: 2}
- {fileID: 2100000, guid: 672c36f6dbb36b5439cc0fdd2f74c531, type: 2}
- {fileID: 2100000, guid: c10453b4aa0c864458b74f3797cb611e, type: 2}
- {fileID: 2100000, guid: 885429151ec5f6a4a926f6aaabd7e001, type: 2}
- {fileID: 2100000, guid: bc5888e576e9cb34bab7b7af42d2b63f, type: 2}
- {fileID: 2100000, guid: 332daba92d0976f4d86bdcdc1a94179e, type: 2}
- {fileID: 2100000, guid: d1244b908a4cccd4397cc9cad45fe846, type: 2}
- {fileID: 2100000, guid: 80746b095abb6ce41a1c737df3649172, type: 2}
- {fileID: 2100000, guid: 885429151ec5f6a4a926f6aaabd7e001, type: 2}
- {fileID: 2100000, guid: 332daba92d0976f4d86bdcdc1a94179e, type: 2}
- {fileID: 2100000, guid: 35c2a316ece610b4b963e047e5238337, type: 2}
- {fileID: 2100000, guid: cac39def7281c5c488b6a3465ec1951b, type: 2}
- {fileID: 2100000, guid: bc5888e576e9cb34bab7b7af42d2b63f, type: 2}
- {fileID: 2100000, guid: c10453b4aa0c864458b74f3797cb611e, type: 2}
- {fileID: 2100000, guid: cf9efbb6277ea2d4aa7d30bc9073915e, type: 2}
LightMapsNear: []
LightMapsFar: []

View File

@ -1,140 +0,0 @@
fileFormatVersion: 2
guid: 9f698044801396841bdc0c9837364ce7
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 1
seamlessCubemap: 1
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: 0
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 2
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 100
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,140 +0,0 @@
fileFormatVersion: 2
guid: ac519d663b2d93442bf1a080be212a73
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 1
seamlessCubemap: 1
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: 0
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 2
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 100
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1347,7 +1347,7 @@ public class GameManagerRound1 : GameManagerBase
{
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
_PlayerPodiums[i].SendCustomNetworkEvent(NetworkEventTarget.All, "EnableChoiceCards", true);
_PlayerPodiums[i].SendCustomNetworkEvent(NetworkEventTarget.All, "EnableChoiceCards", true, _QuestionIndex % _PlayerPodiums[i].GetColourOptionsCount());
}
}
@ -1355,7 +1355,7 @@ public class GameManagerRound1 : GameManagerBase
{
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
_PlayerPodiums[i].SendCustomNetworkEvent(NetworkEventTarget.All, "EnableChoiceCards", false);
_PlayerPodiums[i].SendCustomNetworkEvent(NetworkEventTarget.All, "EnableChoiceCards", false, 0);
}
}

View File

@ -18,12 +18,21 @@ public class PermissionsPanel : UdonSharpBehaviour
[SerializeField] private RectTransform _ListContainer;
[SerializeField] private GameObject _PlayerItemTemplate;
private const int MAX_PLAYERS_IN_LIST = 85;
private const int MAX_PLAYERS_IN_LIST = 100;
void Start()
{
for (int i = 0; i < PlayerData_Name.Length; i++)
{
GameObject NewListItem = Instantiate<GameObject>(_PlayerItemTemplate, _ListContainer, false);
NewListItem.SetActive(false);
}
}
public override void OnPlayerJoined(VRCPlayerApi Player)
{
for (int i = 0; i < MAX_PLAYERS_IN_LIST; i++)
for (int i = 0; i < PlayerData_Name.Length; i++)
{
if (PlayerData_Name[i] == null)
{
@ -38,6 +47,7 @@ public class PermissionsPanel : UdonSharpBehaviour
}
}
RebuildPlayerList();
RequestSerialization();
base.OnPlayerJoined(Player);
@ -45,44 +55,18 @@ public class PermissionsPanel : UdonSharpBehaviour
public override void OnPlayerLeft(VRCPlayerApi Player)
{
for (int i = 0; i < MAX_PLAYERS_IN_LIST; i++)
for (int i = 0; i < PlayerData_Name.Length; i++)
{
if (PlayerData_Name[i] == Player.displayName)
{
Debug.Log("[PermissionsPanel] Found exiting player " + PlayerData_Name[i] + "on the list. Removing...");
PlayerData_Name[i] = null;
Debug.Log("[PermissionsPanel] PlayerData_Name[" + i + "] now equals " + PlayerData_Name[i]);
break;
}
}
string[] NewPlayerData_Name = new string[MAX_PLAYERS_IN_LIST];
int[] NewPlayerData_ID = new int[MAX_PLAYERS_IN_LIST];
bool[] NewPlayerData_Admin = new bool[MAX_PLAYERS_IN_LIST];
bool[] NewPlayerData_Host = new bool[MAX_PLAYERS_IN_LIST];
bool[] NewPlayerData_Camera = new bool[MAX_PLAYERS_IN_LIST];
for (int i = 0; i < MAX_PLAYERS_IN_LIST; i++)
{
for (int j = i; j < MAX_PLAYERS_IN_LIST; j++)
{
if (PlayerData_Name[j] != null)
{
NewPlayerData_Name[i] = PlayerData_Name[j];
NewPlayerData_ID[i] = PlayerData_ID[j];
NewPlayerData_Admin[i] = PlayerData_Admin[j];
NewPlayerData_Host[i] = PlayerData_Host[j];
NewPlayerData_Camera[i] = PlayerData_Camera[j];
break;
}
}
}
PlayerData_Name = NewPlayerData_Name;
PlayerData_ID = NewPlayerData_ID;
PlayerData_Admin = NewPlayerData_Admin;
PlayerData_Host = NewPlayerData_Host;
PlayerData_Camera = NewPlayerData_Camera;
RebuildPlayerList();
RequestSerialization();
base.OnPlayerLeft(Player);
@ -90,13 +74,15 @@ public class PermissionsPanel : UdonSharpBehaviour
public override void OnDeserialization(DeserializationResult Result)
{
RebuildPlayerList();
base.OnDeserialization(Result);
}
public void PermissionsChanged()
{
for (int i = 0; i < _ListContainer.childCount; i++)
for (int i = 0; i < PlayerData_Name.Length; i++)
{
GameObject Entry = _ListContainer.GetChild(i).gameObject;
PermissionsPanelPlayerEntry PlayerEntry = Entry.GetComponent<PermissionsPanelPlayerEntry>();
@ -110,26 +96,32 @@ public class PermissionsPanel : UdonSharpBehaviour
private void RebuildPlayerList()
{
int CurrentListCount = _ListContainer.childCount;
for (int i = 0; i < CurrentListCount; i++)
Debug.Log("[PermissionsPanel] Rebuilding the player list...");
for (int i = 0; i < PlayerData_Name.Length; i++)
{
Destroy(_ListContainer.GetChild(CurrentListCount - i - 1).gameObject);
}
Debug.Log("[PermissionsPanel] PlayerData_Name[" + i + "] is " + PlayerData_Name[i]);
for (int i = 0; i < VRCPlayerApi.GetPlayerCount(); i++)
{
GameObject NewListItem = Instantiate<GameObject>(_PlayerItemTemplate, _ListContainer, false);
NewListItem.SetActive(true);
PermissionsPanelPlayerEntry PlayerListItem = NewListItem.GetComponent<PermissionsPanelPlayerEntry>();
PlayerListItem.PlayerNameUI.text = PlayerData_Name[i];
PermissionsPanelPlayerEntry PlayerListItem = _ListContainer.GetChild(i).GetComponent<PermissionsPanelPlayerEntry>();
PlayerListItem.AdminToggle.SetIsOnWithoutNotify(PlayerData_Admin[i]);
PlayerListItem.HostToggle.SetIsOnWithoutNotify(PlayerData_Host[i]);
PlayerListItem.CameraToggle.SetIsOnWithoutNotify(PlayerData_Camera[i]);
if (PlayerData_Name[i] != null)
{
PlayerListItem.PlayerNameUI.text = PlayerData_Name[i];
PlayerListItem.AdminToggle.interactable = false;
PlayerListItem.HostToggle.interactable = false;
PlayerListItem.CameraToggle.interactable = false;
PlayerListItem.AdminToggle.SetIsOnWithoutNotify(PlayerData_Admin[i]);
PlayerListItem.HostToggle.SetIsOnWithoutNotify(PlayerData_Host[i]);
PlayerListItem.CameraToggle.SetIsOnWithoutNotify(PlayerData_Camera[i]);
PlayerListItem.AdminToggle.interactable = (Networking.LocalPlayer.isInstanceOwner || Networking.LocalPlayer.isMaster);
PlayerListItem.HostToggle.interactable = (Networking.LocalPlayer.isInstanceOwner || Networking.LocalPlayer.isMaster);
PlayerListItem.CameraToggle.interactable = (Networking.LocalPlayer.isInstanceOwner || Networking.LocalPlayer.isMaster);
PlayerListItem.gameObject.SetActive(true);
}
else
{
PlayerListItem.gameObject.SetActive(false);
}
}
}
}

View File

@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 4
Data: 5
- Name:
Entry: 7
Data:
@ -176,19 +176,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _SpawnPosition
Data: _Mesh
- Name: $v
Entry: 7
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SpawnPosition
Data: _Mesh
- Name: <UserType>k__BackingField
Entry: 7
Data: 12|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Transform, UnityEngine.CoreModule
Data: UnityEngine.MeshRenderer, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -236,19 +236,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _HeldPosition
Data: _SpawnPosition
- Name: $v
Entry: 7
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _HeldPosition
Data: _SpawnPosition
- Name: <UserType>k__BackingField
Entry: 9
Data: 12
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: 12
Data: 16
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -263,13 +269,67 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 16|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 17|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 17|UnityEngine.SerializeField, UnityEngine.CoreModule
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:

View File

@ -1,7 +1,5 @@

using UdonSharp;
using UdonSharp.Examples.Utilities;
using UnityEditor;
using UnityEngine;
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
@ -13,6 +11,7 @@ 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;
@ -32,6 +31,11 @@ public class ChoiceCard : UdonSharpBehaviour
CardGroup = ParentCardGroup;
}
public void SetColourMaterial(Material Colour)
{
_Mesh.sharedMaterial = Colour;
}
[NetworkCallable]
public void SetToHeldPosition()
{

View File

@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 6
Data: 7
- Name:
Entry: 7
Data:
@ -242,19 +242,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _PCCardHeldPosition
Data: _ChoiceCardColourOptions
- Name: $v
Entry: 7
Data: 16|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PCCardHeldPosition
Data: _ChoiceCardColourOptions
- Name: <UserType>k__BackingField
Entry: 7
Data: 17|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.GameObject, UnityEngine.CoreModule
Data: UnityEngine.Material[], UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -302,19 +302,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _PCCardAnimator
Data: _PCCardHeldPosition
- Name: $v
Entry: 7
Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _PCCardAnimator
Data: _PCCardHeldPosition
- Name: <UserType>k__BackingField
Entry: 7
Data: 21|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Animator, UnityEngine.AnimationModule
Data: UnityEngine.GameObject, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -362,16 +362,76 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _SelectedChoice
Data: _PCCardAnimator
- Name: $v
Entry: 7
Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SelectedChoice
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
@ -380,7 +440,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 25
Data: 29
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -395,13 +455,13 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 26|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 30|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 27|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 31|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:

View File

@ -3,7 +3,6 @@ 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;
@ -15,6 +14,7 @@ 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;
@ -139,7 +139,7 @@ public class ChoiceCardGroup : UdonSharpBehaviour
}
}
public void ResetCards()
public void ResetCards(int Colour = 0)
{
_SelectedChoice = -1;
@ -156,6 +156,8 @@ public class ChoiceCardGroup : UdonSharpBehaviour
_ChoiceCardText[i].text = "";
_ChoiceCardText[i].gameObject.SetActive(false);
Card.SetColourMaterial(_ChoiceCardColourOptions[Colour]);
Card.DisableInteractive = IsInVR;
VRCPickup Pickup = Card.GetComponent<VRCPickup>();
@ -167,4 +169,9 @@ public class ChoiceCardGroup : UdonSharpBehaviour
_PCCardAnimator.SetBool("Turn Forward", false);
}
public int GetColourOptionsCount()
{
return _ChoiceCardColourOptions.Length;
}
}

View File

@ -149,7 +149,7 @@ public class PlayerPodium : UdonSharpBehaviour
public void ResetPodium()
{
ResetOwner();
EnableChoiceCards(false);
EnableChoiceCards(false, 0);
EnableBuzzer(false);
HighlightPodium(false);
ShowAuxiliaryVideoScreen(false);
@ -181,10 +181,10 @@ public class PlayerPodium : UdonSharpBehaviour
[NetworkCallable]
public void EnableChoiceCards(bool Enable)
public void EnableChoiceCards(bool Enable, int ColourChoice)
{
_ChoiceCards.gameObject.SetActive(Enable);
_ChoiceCards.ResetCards();
_ChoiceCards.ResetCards(ColourChoice);
_ChoiceCards.SendCustomNetworkEvent(NetworkEventTarget.Owner, "MakeChoiceTextVisible");
}
@ -212,6 +212,11 @@ public class PlayerPodium : UdonSharpBehaviour
return IsCorrectResponse;
}
public int GetColourOptionsCount()
{
return _ChoiceCards.GetColourOptionsCount();
}
[NetworkCallable]
public void EnableRiskCards(bool Enable)

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: BoneFollower
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: ccbda9bf23e2f714c9226283c77a92e5,
serializedUdonProgramAsset: {fileID: 11400000, guid: 52ecc8a73071e8e40928c3609699fcf4,
type: 2}
udonAssembly:
assemblyError:

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: InteractToggle
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 405e38d3dfb2f514daeed0e28fbb4864,
serializedUdonProgramAsset: {fileID: 11400000, guid: 873dfce61b1514e429c92e0d2fded7de,
type: 2}
udonAssembly:
assemblyError:

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: PlayerModSetter
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: f938e6c4ff027a74da405a1f9353fd2b,
serializedUdonProgramAsset: {fileID: 11400000, guid: e81558796a212ab4d88e305e2010f24b,
type: 2}
udonAssembly:
assemblyError:

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: GlobalToggleObject
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: c49c9265a3ef24642a6a4465d0a78872,
serializedUdonProgramAsset: {fileID: 11400000, guid: 2fe8ced6184000f49bca526cd2c5891c,
type: 2}
udonAssembly:
assemblyError:

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: MasterToggleObject
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 04024a76ab1924042ba521e11cb76d91,
serializedUdonProgramAsset: {fileID: 11400000, guid: a2d01d9f36ac6df49831be249e48ecc4,
type: 2}
udonAssembly:
assemblyError:

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: TrackingDataFollower
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 17f8fbbe6cc186d4f8dbb057b01a4ec2,
serializedUdonProgramAsset: {fileID: 11400000, guid: 1b89d4552983c0448a7389decec3b555,
type: 2}
udonAssembly:
assemblyError:

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: WorldAudioSettings
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 128d924a3066b7546b2d1c73e61006ab,
serializedUdonProgramAsset: {fileID: 11400000, guid: 994b559b0f158b4499f8937980ed8694,
type: 2}
udonAssembly:
assemblyError: