Location board should now be fully functional, and has placeholder textures.
This commit is contained in:
@@ -44,25 +44,25 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 2
|
||||
Data: 12
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: LocationPanelText
|
||||
Data: _LootLocation
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: LocationPanelText
|
||||
Data: _LootLocation
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 3|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: TMPro.TextMeshProUGUI[], Unity.TextMeshPro
|
||||
Data: System.Int32, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -72,6 +72,192 @@ MonoBehaviour:
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 3
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 2
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 5|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 6|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: _WarrantLocation
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 7|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _WarrantLocation
|
||||
- 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: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 2
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 9|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 10|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: _CrookLocation
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _CrookLocation
|
||||
- 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: 12|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 2
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 13|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 14|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: LocationPanelsEmpty
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: LocationPanelsEmpty
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 16|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.GameObject[], 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:
|
||||
@@ -83,7 +269,205 @@ MonoBehaviour:
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 17|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: LocationPanelsLoot
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 18|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: LocationPanelsLoot
|
||||
- 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: 19|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: LocationPanelsWarrant
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: LocationPanelsWarrant
|
||||
- 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: 21|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: LocationPanelsCrook
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 22|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: LocationPanelsCrook
|
||||
- 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: 23|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: LocationPanelText
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: LocationPanelText
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 25|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: TMPro.TextMeshProUGUI[], Unity.TextMeshPro
|
||||
- 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: 0
|
||||
@@ -107,13 +491,13 @@ MonoBehaviour:
|
||||
Data: _Animator
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 27|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Animator
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 6|System.RuntimeType, mscorlib
|
||||
Data: 28|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.Animator, UnityEngine.AnimationModule
|
||||
@@ -122,7 +506,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 6
|
||||
Data: 28
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -137,7 +521,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 29|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -153,6 +537,174 @@ MonoBehaviour:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _ActiveSpinners
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 30|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ActiveSpinners
|
||||
- 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: 31|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 32|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: _OrderIsCorrect
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 33|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _OrderIsCorrect
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 34|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean[], mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 34
|
||||
- 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: 35|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 36|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: _HasBeenCheckedBefore
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 37|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _HasBeenCheckedBefore
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 34
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 34
|
||||
- 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: 38|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 39|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:
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using TMPro;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.Dynamics;
|
||||
using VRC.SDK3.UdonNetworkCalling;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
@@ -11,20 +12,123 @@ using VRC.Udon.Common.Interfaces;
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
public class LocationBoard : UdonSharpBehaviour
|
||||
{
|
||||
[UdonSynced, FieldChangeCallback(nameof(LootLocation))] private int _LootLocation = 0;
|
||||
[UdonSynced, FieldChangeCallback(nameof(WarrantLocation))] private int _WarrantLocation = 0;
|
||||
[UdonSynced, FieldChangeCallback(nameof(CrookLocation))] private int _CrookLocation = 0;
|
||||
|
||||
public GameObject[] LocationPanelsEmpty;
|
||||
public GameObject[] LocationPanelsLoot;
|
||||
public GameObject[] LocationPanelsWarrant;
|
||||
public GameObject[] LocationPanelsCrook;
|
||||
public TextMeshProUGUI[] LocationPanelText;
|
||||
|
||||
private Animator _Animator;
|
||||
|
||||
[UdonSynced] private int _ActiveSpinners = 0;
|
||||
[UdonSynced] private bool[] _OrderIsCorrect = new bool[3];
|
||||
[UdonSynced] private bool[] _HasBeenCheckedBefore;
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_HasBeenCheckedBefore = new bool[LocationPanelsEmpty.Length];
|
||||
|
||||
_Animator = GetComponent<Animator>();
|
||||
|
||||
// ********** DEBUG **********
|
||||
RandomiseLocation();
|
||||
// ******** END DEBUG ********
|
||||
}
|
||||
|
||||
[NetworkCallable]
|
||||
public void RevealPanel(int Panel)
|
||||
{
|
||||
_Animator.SetBool("Flip " + Panel, true);
|
||||
if (_ActiveSpinners < 3)
|
||||
{
|
||||
_Animator.SetBool("Flip " + Panel, true);
|
||||
|
||||
switch (_ActiveSpinners)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
if (Panel == LootLocation)
|
||||
{
|
||||
_OrderIsCorrect[0] = true;
|
||||
Debug.LogWarning("On the right track...");
|
||||
}
|
||||
else if (Panel == WarrantLocation || Panel == CrookLocation)
|
||||
{
|
||||
_OrderWarning();
|
||||
}
|
||||
} break;
|
||||
case 1:
|
||||
{
|
||||
if (Panel == WarrantLocation)
|
||||
{
|
||||
_OrderIsCorrect[1] = (Panel == WarrantLocation);
|
||||
Debug.LogWarning("Almost there...");
|
||||
}
|
||||
else if (Panel == LootLocation || Panel == CrookLocation)
|
||||
{
|
||||
_OrderWarning();
|
||||
}
|
||||
else if (_HasBeenCheckedBefore[Panel - 1] && (_OrderIsCorrect[0] == false))
|
||||
{
|
||||
_StrategyComment();
|
||||
}
|
||||
} break;
|
||||
case 2:
|
||||
{
|
||||
if (Panel == CrookLocation)
|
||||
{
|
||||
_OrderIsCorrect[2] = (Panel == CrookLocation);
|
||||
Debug.LogWarning("You got it!");
|
||||
}
|
||||
else if (Panel == LootLocation || Panel == WarrantLocation)
|
||||
{
|
||||
_OrderWarning();
|
||||
}
|
||||
else if (_HasBeenCheckedBefore[Panel - 1] && (_OrderIsCorrect[0] == false && _OrderIsCorrect[1] == false))
|
||||
{
|
||||
_StrategyComment();
|
||||
}
|
||||
} break;
|
||||
}
|
||||
|
||||
_ActiveSpinners++;
|
||||
|
||||
if (Panel == LootLocation || Panel == WarrantLocation || Panel == CrookLocation)
|
||||
{
|
||||
if (_OrderIsCorrect[0] && _OrderIsCorrect[1] && _OrderIsCorrect[2])
|
||||
{
|
||||
_ActiveSpinners = 3;
|
||||
SendCustomEventDelayedSeconds(nameof(GameWasWon), 1.0f);
|
||||
}
|
||||
else if (_ActiveSpinners >= 3)
|
||||
{
|
||||
SendCustomEventDelayedSeconds(nameof(ResetPanelBoard), 1.0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_ActiveSpinners = 3;
|
||||
SendCustomEventDelayedSeconds(nameof(ResetPanelBoard), 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
_HasBeenCheckedBefore[Panel - 1] = true;
|
||||
}
|
||||
public void GameWasWon()
|
||||
{
|
||||
Debug.LogError("Game was won!");
|
||||
}
|
||||
private void _OrderWarning()
|
||||
{
|
||||
Debug.LogWarning("Remember the order: loot, warrant, crook. Use some strategy.");
|
||||
}
|
||||
private void _StrategyComment()
|
||||
{
|
||||
Debug.Log("Nice strategy.");
|
||||
}
|
||||
|
||||
[NetworkCallable]
|
||||
@@ -34,6 +138,85 @@ public class LocationBoard : UdonSharpBehaviour
|
||||
{
|
||||
_Animator.SetBool("Flip " + i, false);
|
||||
}
|
||||
_ActiveSpinners = 0;
|
||||
_OrderIsCorrect[0] = _OrderIsCorrect[1] = _OrderIsCorrect[2] = false;
|
||||
}
|
||||
|
||||
|
||||
public void RandomiseLocation()
|
||||
{
|
||||
Random.InitState(Networking.GetServerTimeInMilliseconds());
|
||||
|
||||
LootLocation = Random.Range(0, LocationPanelsLoot.Length) + 1;
|
||||
|
||||
int TempWarrantLocation = _LootLocation;
|
||||
while (TempWarrantLocation == _LootLocation)
|
||||
{
|
||||
TempWarrantLocation = Random.Range(0, LocationPanelsWarrant.Length) + 1;
|
||||
}
|
||||
WarrantLocation = TempWarrantLocation;
|
||||
|
||||
int TempCrookLocation = _WarrantLocation;
|
||||
while (TempCrookLocation == _WarrantLocation || TempCrookLocation == _LootLocation)
|
||||
{
|
||||
TempCrookLocation = Random.Range(0, LocationPanelsCrook.Length) + 1;
|
||||
}
|
||||
CrookLocation = TempCrookLocation;
|
||||
|
||||
for (int i = 0; i < LocationPanelsEmpty.Length; i++)
|
||||
{
|
||||
_HasBeenCheckedBefore[i] = false;
|
||||
}
|
||||
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
private void PlaceEmpty(int Panel)
|
||||
{
|
||||
if (Panel > 0)
|
||||
{
|
||||
LocationPanelsLoot[Panel - 1].SetActive(false);
|
||||
LocationPanelsWarrant[Panel - 1].SetActive(false);
|
||||
LocationPanelsCrook[Panel - 1].SetActive(false);
|
||||
|
||||
LocationPanelsEmpty[Panel - 1].SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void PlaceLoot(int Panel)
|
||||
{
|
||||
if (Panel > 0)
|
||||
{
|
||||
LocationPanelsEmpty[Panel - 1].SetActive(false);
|
||||
LocationPanelsWarrant[Panel - 1].SetActive(false);
|
||||
LocationPanelsCrook[Panel - 1].SetActive(false);
|
||||
|
||||
LocationPanelsLoot[Panel - 1].SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void PlaceWarrant(int Panel)
|
||||
{
|
||||
if (Panel > 0)
|
||||
{
|
||||
LocationPanelsEmpty[Panel - 1].SetActive(false);
|
||||
LocationPanelsLoot[Panel - 1].SetActive(false);
|
||||
LocationPanelsCrook[Panel - 1].SetActive(false);
|
||||
|
||||
LocationPanelsWarrant[Panel - 1].SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void PlaceCrook(int Panel)
|
||||
{
|
||||
if (Panel > 0)
|
||||
{
|
||||
LocationPanelsEmpty[Panel - 1].SetActive(false);
|
||||
LocationPanelsLoot[Panel - 1].SetActive(false);
|
||||
LocationPanelsWarrant[Panel - 1].SetActive(false);
|
||||
|
||||
LocationPanelsCrook[Panel - 1].SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,4 +237,38 @@ public class LocationBoard : UdonSharpBehaviour
|
||||
public void Button_RevealPanel15() { NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)this, NetworkEventTarget.All, "RevealPanel", 15); }
|
||||
|
||||
public void Button_ResetPanelBoard() { NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)this, NetworkEventTarget.All, "ResetPanelBoard"); }
|
||||
|
||||
|
||||
public int LootLocation
|
||||
{
|
||||
set
|
||||
{
|
||||
PlaceEmpty(_LootLocation);
|
||||
_LootLocation = value;
|
||||
PlaceLoot(value);
|
||||
}
|
||||
get => _LootLocation;
|
||||
}
|
||||
|
||||
public int WarrantLocation
|
||||
{
|
||||
set
|
||||
{
|
||||
PlaceEmpty(_WarrantLocation);
|
||||
_WarrantLocation = value;
|
||||
PlaceWarrant(_WarrantLocation);
|
||||
}
|
||||
get => _WarrantLocation;
|
||||
}
|
||||
|
||||
public int CrookLocation
|
||||
{
|
||||
set
|
||||
{
|
||||
PlaceEmpty(_CrookLocation);
|
||||
_CrookLocation = value;
|
||||
PlaceCrook(_CrookLocation);
|
||||
}
|
||||
get => _CrookLocation;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user