Changed buzzer effect to a blinking scoreboard.

This commit is contained in:
Jamie Greunbaum 2025-09-03 00:45:35 -04:00
parent 1fe9513792
commit 17c5b44580
5 changed files with 543 additions and 227 deletions

View File

@ -1050,7 +1050,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &7566631391838123814
RectTransform:
m_ObjectHideFlags: 0
@ -1063,12 +1063,13 @@ RectTransform:
m_LocalScale: {x: 0.001, y: 0.001, z: 0.001}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8365401012355933924}
- {fileID: 826871961533866949}
m_Father: {fileID: 5984335492357139332}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0.612}
m_AnchoredPosition: {x: 0, y: 0.5792}
m_SizeDelta: {x: 700, y: 450}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &415553858303482294
@ -1117,6 +1118,81 @@ MonoBehaviour:
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 1
--- !u!1 &5493248653452659307
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8365401012355933924}
- component: {fileID: 3640938068717699787}
- component: {fileID: 4701622366132471396}
m_Layer: 0
m_Name: Score Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8365401012355933924
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5493248653452659307}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7566631391838123814}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3640938068717699787
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5493248653452659307}
m_CullTransparentMesh: 1
--- !u!114 &4701622366132471396
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5493248653452659307}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &6181750060712598379
GameObject:
m_ObjectHideFlags: 0
@ -1129,7 +1205,7 @@ GameObject:
- component: {fileID: 2896373937264359406}
- component: {fileID: 8474886526797794486}
m_Layer: 0
m_Name: Podium Buzzed In Effect
m_Name: Podium Highlight Effect
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -1410,10 +1486,11 @@ MonoBehaviour:
_AuxiliaryVideoScreen: {fileID: 0}
_AuxiliaryMapScreen: {fileID: 0}
_OwnershipInteract: {fileID: 2288460166211710674}
_BuzzedInEffect: {fileID: 6181750060712598379}
_HighlightEffect: {fileID: 6181750060712598379}
_ScorecardObject: {fileID: 5278643753074928947}
_NameplateUI: {fileID: 5247165531706728442}
_ScorecardUI: {fileID: 3651303298073640538}
_ScorecardBackground: {fileID: 4701622366132471396}
--- !u!114 &2656281140157091124
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -8521,6 +8521,11 @@ PrefabInstance:
propertyPath: m_Navigation.m_Mode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4701622366132471396, guid: 79ebe62246f7f464e98373cb14765f9a,
type: 3}
propertyPath: m_Material
value:
objectReference: {fileID: 2100000, guid: 35630e38b4e5ffb40b44ec5348b4333f, type: 2}
- target: {fileID: 4798477012542561380, guid: 79ebe62246f7f464e98373cb14765f9a,
type: 3}
propertyPath: m_AnchorMax.y
@ -30661,6 +30666,11 @@ PrefabInstance:
propertyPath: m_Navigation.m_Mode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4701622366132471396, guid: 79ebe62246f7f464e98373cb14765f9a,
type: 3}
propertyPath: m_Material
value:
objectReference: {fileID: 2100000, guid: 35630e38b4e5ffb40b44ec5348b4333f, type: 2}
- target: {fileID: 4798477012542561380, guid: 79ebe62246f7f464e98373cb14765f9a,
type: 3}
propertyPath: m_AnchorMax.y
@ -75508,6 +75518,11 @@ PrefabInstance:
propertyPath: m_Navigation.m_Mode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4701622366132471396, guid: 79ebe62246f7f464e98373cb14765f9a,
type: 3}
propertyPath: m_Material
value:
objectReference: {fileID: 2100000, guid: 35630e38b4e5ffb40b44ec5348b4333f, type: 2}
- target: {fileID: 4798477012542561380, guid: 79ebe62246f7f464e98373cb14765f9a,
type: 3}
propertyPath: m_AnchorMax.y
@ -77747,36 +77762,36 @@ MonoBehaviour:
useAssignedLayers: 0
DynamicPrefabs: []
DynamicMaterials:
- {fileID: 2100000, guid: e45d02bbf7268504ca58513c548a58e7, type: 2}
- {fileID: 2100000, guid: 71fff76911e92ab43a71d15602da4c4b, type: 2}
- {fileID: 2100000, guid: 9cdc0250a4c9b534fae68ae6aa90bf31, type: 2}
- {fileID: 2100000, guid: 885429151ec5f6a4a926f6aaabd7e001, type: 2}
- {fileID: 2100000, guid: 82f2961c9baa48a45ac897be257fd655, type: 2}
- {fileID: 2100000, guid: 80746b095abb6ce41a1c737df3649172, type: 2}
- {fileID: 2100000, guid: c1b531b2f1a7dab43b46daa7546cfda7, type: 2}
- {fileID: 2100000, guid: 0c3dfdcd7a2a6ac408ec3d431f9a4932, type: 2}
- {fileID: 2100000, guid: accd304c49b7d6d43b97738e8e118342, type: 2}
- {fileID: 2100000, guid: 2c0cd617d97924748a9d5e2eeb2039b5, type: 2}
- {fileID: 2100000, guid: 0c3dfdcd7a2a6ac408ec3d431f9a4932, type: 2}
- {fileID: 2100000, guid: c1b531b2f1a7dab43b46daa7546cfda7, type: 2}
- {fileID: 2100000, guid: 348ff3cc54305654d9eeebbbb385c262, type: 2}
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 2100000, guid: 672c36f6dbb36b5439cc0fdd2f74c531, type: 2}
- {fileID: 2100000, guid: a793cd1d5fe89c440900d816c7b8c323, type: 2}
- {fileID: 2100000, guid: dba163de40c568b48ae2ffa7c83c66b9, type: 2}
- {fileID: 2100000, guid: 332daba92d0976f4d86bdcdc1a94179e, type: 2}
- {fileID: 2100000, guid: 4fb0b8cdca56f5d47be970c7490cb7a1, type: 2}
- {fileID: 2100000, guid: 35c2a316ece610b4b963e047e5238337, type: 2}
- {fileID: 2100000, guid: d1244b908a4cccd4397cc9cad45fe846, type: 2}
- {fileID: 2100000, guid: cac39def7281c5c488b6a3465ec1951b, type: 2}
- {fileID: 2100000, guid: c3186340e03d26341969d34663dbf8f3, type: 2}
- {fileID: 2100000, guid: 80746b095abb6ce41a1c737df3649172, 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: 82f2961c9baa48a45ac897be257fd655, type: 2}
- {fileID: 2100000, guid: 9cdc0250a4c9b534fae68ae6aa90bf31, type: 2}
- {fileID: 2100000, guid: e45d02bbf7268504ca58513c548a58e7, type: 2}
- {fileID: 2100000, guid: 348ff3cc54305654d9eeebbbb385c262, type: 2}
- {fileID: 2100000, guid: 20b7b61cb65ead644a4959264fc90833, 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: 2100000, guid: a793cd1d5fe89c440900d816c7b8c323, type: 2}
- {fileID: 2100000, guid: 98166ed003d332e488319f662c3b4429, type: 2}
- {fileID: 2100000, guid: 672c36f6dbb36b5439cc0fdd2f74c531, type: 2}
- {fileID: 2100000, guid: dba163de40c568b48ae2ffa7c83c66b9, type: 2}
- {fileID: 2100000, guid: d1244b908a4cccd4397cc9cad45fe846, 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: 71fff76911e92ab43a71d15602da4c4b, type: 2}
- {fileID: 2100000, guid: cf9efbb6277ea2d4aa7d30bc9073915e, type: 2}
LightMapsNear: []
LightMapsFar: []

View File

@ -213,7 +213,7 @@ public class GameManagerRound1 : GameManagerBase
ShowBetweenQuestionsInterface();
_VideoPlayer.PlayVideo = false;
_VideoPlayer.ShowScreen = ClueScreenType.Blank;
_GameHasBegun = true;
}
@ -1019,7 +1019,7 @@ public class GameManagerRound1 : GameManagerBase
Interface.CommentUI.text =
"- Before you show us your answer, how much did you risk?\n" +
"- What is your answer?";
_PlayerPodiums[PlayerNumber - 1].EnableBuzzInEffect(true);
_PlayerPodiums[PlayerNumber - 1].HighlightPodium(true);
EnableInteraction("Assign Points");
}
@ -1028,7 +1028,7 @@ public class GameManagerRound1 : GameManagerBase
{
int PlayerNumber = _FinalRoundPlayersSortedByScore[PlayerPlace - 1];
_PlayerPodiums[PlayerNumber - 1].EnableBuzzInEffect(false);
_PlayerPodiums[PlayerNumber - 1].HighlightPodium(false);
_PlayerPodiums[PlayerNumber - 1].VerifyFinalRoundResponse(_QuestionCorrectResponse);
// If we're assigning points to the first-place player, then we're
@ -1295,11 +1295,6 @@ public class GameManagerRound1 : GameManagerBase
public void TiebreakerIncorrectResponse()
{
int PodiumIndex = _BuzzedInPlayer - 1;
if (PodiumIndex >= 0 && PodiumIndex < _PlayerPodiums.Length)
{
_PlayerPodiums[PodiumIndex].SendCustomNetworkEvent(NetworkEventTarget.All,
"EnableBuzzInEffect", false);
}
_BuzzedInPlayer = -1;
_BuzzInAllowed = true;
@ -1421,12 +1416,7 @@ public class GameManagerRound1 : GameManagerBase
{
_BuzzInAllowed = true;
int PodiumIndex = _BuzzedInPlayer - 1;
if (PodiumIndex >= 0 && PodiumIndex < _PlayerPodiums.Length)
{
_PlayerPodiums[PodiumIndex].SendCustomNetworkEvent(NetworkEventTarget.All,
"EnableBuzzInEffect", false);
_BuzzedInPlayer = -1;
}
_BuzzedInPlayer = -1;
RequestSerialization();
}
@ -1443,8 +1433,7 @@ public class GameManagerRound1 : GameManagerBase
_BuzzedInPlayer = PlayerNumber;
RequestSerialization();
_PlayerPodiums[PlayerIndex].SendCustomNetworkEvent(NetworkEventTarget.All,
"EnableBuzzInEffect", true);
_PlayerPodiums[PlayerIndex].SendCustomNetworkEvent(NetworkEventTarget.Owner, "StartBuzzedInEffect");
// Play the buzzer sound globally.
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
@ -1462,7 +1451,6 @@ public class GameManagerRound1 : GameManagerBase
for (int i = 0; i < _PlayerPodiums.Length; i++)
{
_PlayerBuzzInAllowed[i] = true;
_PlayerPodiums[i].SendCustomNetworkEvent(NetworkEventTarget.All, "EnableBuzzInEffect", false);
}
_BuzzedInPlayer = -1;
}

View File

@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 19
Data: 22
- Name:
Entry: 7
Data:
@ -476,13 +476,13 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _EnableOwnershipTransfer
Data: _FlashScoreboard
- Name: $v
Entry: 7
Data: 31|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _EnableOwnershipTransfer
Data: _FlashScoreboard
- Name: <UserType>k__BackingField
Entry: 9
Data: 27
@ -536,16 +536,76 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _ChoiceCards
Data: _EnableOwnershipTransfer
- Name: $v
Entry: 7
Data: 35|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _EnableOwnershipTransfer
- Name: <UserType>k__BackingField
Entry: 9
Data: 27
- 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: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 36|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 37|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 38|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: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ChoiceCards
- Name: <UserType>k__BackingField
Entry: 7
Data: 36|System.RuntimeType, mscorlib
Data: 40|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: ChoiceCardGroup, Assembly-CSharp
@ -569,13 +629,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 37|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 41|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 3
- Name:
Entry: 7
Data: 38|UnityEngine.SpaceAttribute, UnityEngine.CoreModule
Data: 42|UnityEngine.SpaceAttribute, UnityEngine.CoreModule
- Name: height
Entry: 4
Data: 8
@ -584,73 +644,13 @@ MonoBehaviour:
Data:
- Name:
Entry: 7
Data: 39|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
Data: 43|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: Objects
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 40|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _RiskCards
- Name: $v
Entry: 7
Data: 41|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RiskCards
- Name: <UserType>k__BackingField
Entry: 7
Data: 42|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: 43|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 44|UnityEngine.SerializeField, UnityEngine.CoreModule
@ -674,19 +674,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _Buzzer
Data: _RiskCards
- Name: $v
Entry: 7
Data: 45|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Buzzer
Data: _RiskCards
- Name: <UserType>k__BackingField
Entry: 7
Data: 46|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: Buzzer, Assembly-CSharp
Data: RiskCardGroup, Assembly-CSharp
- Name:
Entry: 8
Data:
@ -734,19 +734,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _Pedestal
Data: _Buzzer
- Name: $v
Entry: 7
Data: 49|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Pedestal
Data: _Buzzer
- Name: <UserType>k__BackingField
Entry: 9
Data: 11
Entry: 7
Data: 50|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: Buzzer, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 11
Data: 7
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -761,13 +767,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 50|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 51|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 51|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 52|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -788,25 +794,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _AuxiliaryVideoScreen
Data: _Pedestal
- Name: $v
Entry: 7
Data: 52|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 53|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _AuxiliaryVideoScreen
Data: _Pedestal
- Name: <UserType>k__BackingField
Entry: 7
Data: 53|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Transform, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
Entry: 9
Data: 11
- Name: <SystemType>k__BackingField
Entry: 9
Data: 53
Data: 11
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -848,19 +848,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _AuxiliaryMapScreen
Data: _AuxiliaryVideoScreen
- Name: $v
Entry: 7
Data: 56|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _AuxiliaryMapScreen
Data: _AuxiliaryVideoScreen
- Name: <UserType>k__BackingField
Entry: 9
Data: 53
Entry: 7
Data: 57|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Transform, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 53
Data: 57
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -875,13 +881,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 57|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 58|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 58|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 59|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -902,25 +908,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _OwnershipInteract
Data: _AuxiliaryMapScreen
- Name: $v
Entry: 7
Data: 59|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 60|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _OwnershipInteract
Data: _AuxiliaryMapScreen
- Name: <UserType>k__BackingField
Entry: 7
Data: 60|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: CustomEventInteraction, Assembly-CSharp
- Name:
Entry: 8
Data:
Entry: 9
Data: 57
- Name: <SystemType>k__BackingField
Entry: 9
Data: 7
Data: 57
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -962,13 +962,73 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _BuzzedInEffect
Data: _OwnershipInteract
- Name: $v
Entry: 7
Data: 63|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _BuzzedInEffect
Data: _OwnershipInteract
- Name: <UserType>k__BackingField
Entry: 7
Data: 64|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: CustomEventInteraction, 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: 65|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 66|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: _HighlightEffect
- Name: $v
Entry: 7
Data: 67|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _HighlightEffect
- Name: <UserType>k__BackingField
Entry: 9
Data: 11
@ -989,13 +1049,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 64|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 68|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 3
- Name:
Entry: 7
Data: 65|UnityEngine.SpaceAttribute, UnityEngine.CoreModule
Data: 69|UnityEngine.SpaceAttribute, UnityEngine.CoreModule
- Name: height
Entry: 4
Data: 8
@ -1004,7 +1064,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 7
Data: 66|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
Data: 70|UnityEngine.HeaderAttribute, UnityEngine.CoreModule
- Name: header
Entry: 1
Data: Effects
@ -1013,7 +1073,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 7
Data: 67|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 71|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -1037,7 +1097,7 @@ MonoBehaviour:
Data: _ScorecardObject
- Name: $v
Entry: 7
Data: 68|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 72|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ScorecardObject
@ -1059,66 +1119,6 @@ MonoBehaviour:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 69|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 70|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: 71|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _NameplateUI
- Name: <UserType>k__BackingField
Entry: 7
Data: 72|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 72
- 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: 73|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
@ -1148,19 +1148,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _ScorecardUI
Data: _NameplateUI
- Name: $v
Entry: 7
Data: 75|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ScorecardUI
Data: _NameplateUI
- Name: <UserType>k__BackingField
Entry: 9
Data: 72
Entry: 7
Data: 76|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 72
Data: 76
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@ -1175,13 +1181,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 76|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 77|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 77|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 78|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@ -1197,6 +1203,168 @@ MonoBehaviour:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _ScorecardUI
- Name: $v
Entry: 7
Data: 79|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ScorecardUI
- Name: <UserType>k__BackingField
Entry: 9
Data: 76
- Name: <SystemType>k__BackingField
Entry: 9
Data: 76
- 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: 80|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 81|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: _ScorecardBackground
- Name: $v
Entry: 7
Data: 82|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ScorecardBackground
- Name: <UserType>k__BackingField
Entry: 7
Data: 83|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.UI.Image, UnityEngine.UI
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 83
- 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: 84|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 85|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: _FlashingScoreboardCounter
- Name: $v
Entry: 7
Data: 86|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _FlashingScoreboardCounter
- 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: false
- Name: _fieldAttributes
Entry: 7
Data: 87|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:

View File

@ -6,6 +6,7 @@ using VRC.SDKBase;
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
using System.Runtime.CompilerServices;
using UnityEngine.UI;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
@ -20,6 +21,7 @@ public class PlayerPodium : UdonSharpBehaviour
[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;
@ -38,12 +40,17 @@ public class PlayerPodium : UdonSharpBehaviour
[Space]
[Header("Effects")]
[SerializeField] private GameObject _BuzzedInEffect;
[SerializeField] private GameObject _HighlightEffect;
[SerializeField] private GameObject _ScorecardObject;
[SerializeField] private TextMeshProUGUI _NameplateUI;
[SerializeField] private TextMeshProUGUI _ScorecardUI;
[SerializeField] private Image _ScorecardBackground;
private int _FlashingScoreboardCounter = 0;
private const int MAX_FLASH_COUNTER = 8;
void Start()
@ -54,7 +61,7 @@ public class PlayerPodium : UdonSharpBehaviour
public override void OnPlayerLeft(VRCPlayerApi Player)
{
if (Player.displayName == PlayerName)
if (Player.playerId == _PlayerID)
{
ResetOwner();
}
@ -136,7 +143,7 @@ public class PlayerPodium : UdonSharpBehaviour
ResetOwner();
EnableChoiceCards(false);
EnableBuzzer(false);
EnableBuzzInEffect(false);
HighlightPodium(false);
ShowAuxiliaryVideoScreen(false);
ShowAuxiliaryMapScreen(false);
@ -236,9 +243,52 @@ public class PlayerPodium : UdonSharpBehaviour
}
[NetworkCallable]
public void EnableBuzzInEffect(bool Enable)
public void StartBuzzedInEffect()
{
_BuzzedInEffect.SetActive(Enable);
FlashScoreboard = true;
}
private void BeginBuzzedInEffect()
{
TickFlashingScoreboard();
}
public void TickFlashingScoreboard()
{
if (_FlashingScoreboardCounter < MAX_FLASH_COUNTER)
{
_FlashingScoreboardCounter++;
switch (_FlashingScoreboardCounter % 2)
{
case 1:
InvertScoreboardColours();
break;
case 0:
default:
ResetScoreboardColours();
break;
}
SendCustomEventDelayedSeconds(nameof(TickFlashingScoreboard), 0.15f);
}
else {
ResetScoreboardColours();
_FlashingScoreboardCounter = 0;
}
}
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);
}
@ -287,6 +337,24 @@ public class PlayerPodium : UdonSharpBehaviour
get => _ShowScoreCard;
}
public bool FlashScoreboard
{
set
{
_FlashScoreboard = value;
if (_FlashScoreboard)
{
BeginBuzzedInEffect();
}
else
{
_FlashingScoreboardCounter = 0;
}
RequestSerialization();
}
get => _FlashScoreboard;
}
private bool EnableOwnershipTransfer
{
set