Fixed a few more sync issues, particularly involving resets.
This commit is contained in:
parent
cf2da70229
commit
47be4c1ba2
@ -1457,6 +1457,7 @@ MonoBehaviour:
|
|||||||
- {fileID: 8633085275759225401}
|
- {fileID: 8633085275759225401}
|
||||||
- {fileID: 5206201859598067541}
|
- {fileID: 5206201859598067541}
|
||||||
- {fileID: 8188491842622275102}
|
- {fileID: 8188491842622275102}
|
||||||
|
_LootMaterial: {fileID: 2100000, guid: d5e55f7b62237a04c97dac187cbfb58a, type: 2}
|
||||||
_LocationSheetMaterialSelections:
|
_LocationSheetMaterialSelections:
|
||||||
- {fileID: 2100000, guid: 2c0cd617d97924748a9d5e2eeb2039b5, type: 2}
|
- {fileID: 2100000, guid: 2c0cd617d97924748a9d5e2eeb2039b5, type: 2}
|
||||||
- {fileID: 2100000, guid: d1b6333591e357f45b3761f4314b574d, type: 2}
|
- {fileID: 2100000, guid: d1b6333591e357f45b3761f4314b574d, type: 2}
|
||||||
|
|||||||
@ -4106,7 +4106,7 @@ PrefabInstance:
|
|||||||
- target: {fileID: 6458581458612866833, guid: 126991d511ca61841a0ef899b6c038a6,
|
- target: {fileID: 6458581458612866833, guid: 126991d511ca61841a0ef899b6c038a6,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 0
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 6475313651439430822, guid: 126991d511ca61841a0ef899b6c038a6,
|
- target: {fileID: 6475313651439430822, guid: 126991d511ca61841a0ef899b6c038a6,
|
||||||
type: 3}
|
type: 3}
|
||||||
@ -4654,7 +4654,7 @@ PrefabInstance:
|
|||||||
- target: {fileID: 8686606537753294948, guid: 126991d511ca61841a0ef899b6c038a6,
|
- target: {fileID: 8686606537753294948, guid: 126991d511ca61841a0ef899b6c038a6,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_LocalPosition.y
|
propertyPath: m_LocalPosition.y
|
||||||
value: 0
|
value: -1000
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8686606537753294948, guid: 126991d511ca61841a0ef899b6c038a6,
|
- target: {fileID: 8686606537753294948, guid: 126991d511ca61841a0ef899b6c038a6,
|
||||||
type: 3}
|
type: 3}
|
||||||
@ -19849,6 +19849,11 @@ PrefabInstance:
|
|||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: ClueScreen_Map
|
value: ClueScreen_Map
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 919132149155446097, guid: 0adb3a9b1c6f25347b09f0a1c344b07b,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
@ -22107,6 +22112,11 @@ PrefabInstance:
|
|||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: ClueScreen_Video
|
value: ClueScreen_Video
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 919132149155446097, guid: 0adb3a9b1c6f25347b09f0a1c344b07b,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
@ -40146,7 +40156,7 @@ PrefabInstance:
|
|||||||
- target: {fileID: 6458581458612866833, guid: 899ce13087fd5974f88dcbccaea2df85,
|
- target: {fileID: 6458581458612866833, guid: 899ce13087fd5974f88dcbccaea2df85,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 0
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 6511243431600090744, guid: 899ce13087fd5974f88dcbccaea2df85,
|
- target: {fileID: 6511243431600090744, guid: 899ce13087fd5974f88dcbccaea2df85,
|
||||||
type: 3}
|
type: 3}
|
||||||
@ -40529,7 +40539,7 @@ PrefabInstance:
|
|||||||
- target: {fileID: 8686606537753294948, guid: 899ce13087fd5974f88dcbccaea2df85,
|
- target: {fileID: 8686606537753294948, guid: 899ce13087fd5974f88dcbccaea2df85,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_LocalPosition.y
|
propertyPath: m_LocalPosition.y
|
||||||
value: 0
|
value: -1000
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8686606537753294948, guid: 899ce13087fd5974f88dcbccaea2df85,
|
- target: {fileID: 8686606537753294948, guid: 899ce13087fd5974f88dcbccaea2df85,
|
||||||
type: 3}
|
type: 3}
|
||||||
@ -42287,7 +42297,6 @@ MonoBehaviour:
|
|||||||
DynamicPrefabs: []
|
DynamicPrefabs: []
|
||||||
DynamicMaterials:
|
DynamicMaterials:
|
||||||
- {fileID: 2100000, guid: 0c3dfdcd7a2a6ac408ec3d431f9a4932, type: 2}
|
- {fileID: 2100000, guid: 0c3dfdcd7a2a6ac408ec3d431f9a4932, type: 2}
|
||||||
- {fileID: 2100000, guid: 82f2961c9baa48a45ac897be257fd655, type: 2}
|
|
||||||
- {fileID: 2100000, guid: cac39def7281c5c488b6a3465ec1951b, type: 2}
|
- {fileID: 2100000, guid: cac39def7281c5c488b6a3465ec1951b, type: 2}
|
||||||
- {fileID: 2100000, guid: 9cdc0250a4c9b534fae68ae6aa90bf31, type: 2}
|
- {fileID: 2100000, guid: 9cdc0250a4c9b534fae68ae6aa90bf31, type: 2}
|
||||||
- {fileID: 2100000, guid: af0c1cbaaffed304ba0e3a1fbac41e7e, type: 2}
|
- {fileID: 2100000, guid: af0c1cbaaffed304ba0e3a1fbac41e7e, type: 2}
|
||||||
@ -42306,12 +42315,13 @@ MonoBehaviour:
|
|||||||
- {fileID: 2100000, guid: 82bace4c334919c4f92e87905c39fdf8, type: 2}
|
- {fileID: 2100000, guid: 82bace4c334919c4f92e87905c39fdf8, type: 2}
|
||||||
- {fileID: 2100000, guid: c4382cc6d54262b46913ae6fe8a3740e, type: 2}
|
- {fileID: 2100000, guid: c4382cc6d54262b46913ae6fe8a3740e, type: 2}
|
||||||
- {fileID: 2100000, guid: 7eb7cd9bfc12d4c4198d1874ca5a1aa4, type: 2}
|
- {fileID: 2100000, guid: 7eb7cd9bfc12d4c4198d1874ca5a1aa4, type: 2}
|
||||||
|
- {fileID: 2100000, guid: c3186340e03d26341969d34663dbf8f3, type: 2}
|
||||||
- {fileID: 2100000, guid: 49170bf20870c7c45873b3c1966d86af, type: 2}
|
- {fileID: 2100000, guid: 49170bf20870c7c45873b3c1966d86af, type: 2}
|
||||||
- {fileID: 2100000, guid: bd8b723337ae5824fa61f693f76e943f, type: 2}
|
- {fileID: 2100000, guid: bd8b723337ae5824fa61f693f76e943f, type: 2}
|
||||||
- {fileID: 2100000, guid: faae26a849699fc4b804b74882a344df, type: 2}
|
- {fileID: 2100000, guid: faae26a849699fc4b804b74882a344df, type: 2}
|
||||||
- {fileID: 2100000, guid: a793cd1d5fe89c440900d816c7b8c323, type: 2}
|
- {fileID: 2100000, guid: a793cd1d5fe89c440900d816c7b8c323, type: 2}
|
||||||
|
- {fileID: 2100000, guid: 80746b095abb6ce41a1c737df3649172, type: 2}
|
||||||
- {fileID: 2100000, guid: 71ede89a28bd60e4ca2918572046ba90, type: 2}
|
- {fileID: 2100000, guid: 71ede89a28bd60e4ca2918572046ba90, type: 2}
|
||||||
- {fileID: 2100000, guid: cba30de4550b90f4f8ef7bc7d94faf95, type: 2}
|
|
||||||
- {fileID: 2100000, guid: e45d02bbf7268504ca58513c548a58e7, type: 2}
|
- {fileID: 2100000, guid: e45d02bbf7268504ca58513c548a58e7, type: 2}
|
||||||
- {fileID: 2100000, guid: d1244b908a4cccd4397cc9cad45fe846, type: 2}
|
- {fileID: 2100000, guid: d1244b908a4cccd4397cc9cad45fe846, type: 2}
|
||||||
- {fileID: 2100000, guid: 220d5a1f1701e674794a1083cc2f0bac, type: 2}
|
- {fileID: 2100000, guid: 220d5a1f1701e674794a1083cc2f0bac, type: 2}
|
||||||
|
|||||||
@ -33,12 +33,6 @@ public class GameManagerRound2 : GameManagerBase
|
|||||||
{
|
{
|
||||||
_StageIndex = 0;
|
_StageIndex = 0;
|
||||||
|
|
||||||
LocationBoardReset();
|
|
||||||
|
|
||||||
// Make sure we have the correct interface up after the last function.
|
|
||||||
HostCardBetweenRoundsInterface Interface =
|
|
||||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
|
||||||
|
|
||||||
base.InitialiseGameMode();
|
base.InitialiseGameMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,6 +72,12 @@ public class GameManagerRound2 : GameManagerBase
|
|||||||
|
|
||||||
_LocationBoard.RandomiseMaterials();
|
_LocationBoard.RandomiseMaterials();
|
||||||
_LocationBoard.RandomiseLocations();
|
_LocationBoard.RandomiseLocations();
|
||||||
|
|
||||||
|
LocationBoardReset();
|
||||||
|
// Make sure we have the correct interface up after the last function.
|
||||||
|
HostCardBetweenRoundsInterface Interface =
|
||||||
|
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||||
|
|
||||||
_LocationBoard.RequestSerialization();
|
_LocationBoard.RequestSerialization();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -3,8 +3,6 @@ using UdonSharp;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using VRC.SDK3.Data;
|
using VRC.SDK3.Data;
|
||||||
using VRC.SDK3.UdonNetworkCalling;
|
using VRC.SDK3.UdonNetworkCalling;
|
||||||
using VRC.SDKBase;
|
|
||||||
using VRC.Udon.Common;
|
|
||||||
using VRC.Udon.Common.Interfaces;
|
using VRC.Udon.Common.Interfaces;
|
||||||
|
|
||||||
|
|
||||||
@ -62,8 +60,13 @@ public class GameManagerRound3 : GameManagerBase
|
|||||||
_FailureCounter = 0;
|
_FailureCounter = 0;
|
||||||
_Timer = TIMER_LENGTH;
|
_Timer = TIMER_LENGTH;
|
||||||
|
|
||||||
// We'll need to reset the markers here, too.
|
for (int i = 0; i < _Markers.Length; i++)
|
||||||
|
{
|
||||||
|
_Markers[i].Initialise();
|
||||||
|
}
|
||||||
|
_Markers[0].SetPickupable(true);
|
||||||
|
|
||||||
|
GetCurrentMap().RandomiseCountries();
|
||||||
RequestSerialization();
|
RequestSerialization();
|
||||||
|
|
||||||
base.InitialiseGameMode();
|
base.InitialiseGameMode();
|
||||||
@ -78,8 +81,6 @@ public class GameManagerRound3 : GameManagerBase
|
|||||||
{
|
{
|
||||||
CurrentlyActiveMap = (ContinentMap)(int)_ContinentData["Continent"].Number;
|
CurrentlyActiveMap = (ContinentMap)(int)_ContinentData["Continent"].Number;
|
||||||
RequestSerialization();
|
RequestSerialization();
|
||||||
|
|
||||||
SendCustomEventDelayedSeconds(nameof(GenerateRandomMapLocations), 1.0f);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -88,11 +89,6 @@ public class GameManagerRound3 : GameManagerBase
|
|||||||
|
|
||||||
EnableInteraction("Display Briefing");
|
EnableInteraction("Display Briefing");
|
||||||
}
|
}
|
||||||
public void GenerateRandomMapLocations()
|
|
||||||
{
|
|
||||||
FloorMap Map = GetCurrentMap();
|
|
||||||
Map.RandomiseCountries();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ActivateMap()
|
private void ActivateMap()
|
||||||
{
|
{
|
||||||
@ -101,14 +97,14 @@ public class GameManagerRound3 : GameManagerBase
|
|||||||
FloorMap Map = _Maps[i];
|
FloorMap Map = _Maps[i];
|
||||||
if (Map != null)
|
if (Map != null)
|
||||||
{
|
{
|
||||||
Map.gameObject.SetActive(false);
|
Map.Activate = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FloorMap CurrentMap = _Maps[(int)CurrentlyActiveMap];
|
FloorMap CurrentMap = _Maps[(int)CurrentlyActiveMap];
|
||||||
if (CurrentMap != null)
|
if (CurrentMap != null)
|
||||||
{
|
{
|
||||||
CurrentMap.gameObject.SetActive(true);
|
CurrentMap.Activate = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -704,19 +704,19 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _LocationSheetMaterialSelections
|
Data: _LootMaterial
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 45|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 45|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _LocationSheetMaterialSelections
|
Data: _LootMaterial
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 46|System.RuntimeType, mscorlib
|
Data: 46|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: UnityEngine.Material[], UnityEngine.CoreModule
|
Data: UnityEngine.Material, UnityEngine.CoreModule
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
@ -764,19 +764,19 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _Animator
|
Data: _LocationSheetMaterialSelections
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 49|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 49|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _Animator
|
Data: _LocationSheetMaterialSelections
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 50|System.RuntimeType, mscorlib
|
Data: 50|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: UnityEngine.Animator, UnityEngine.AnimationModule
|
Data: UnityEngine.Material[], UnityEngine.CoreModule
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
@ -794,10 +794,70 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <IsSerialized>k__BackingField
|
- Name: <IsSerialized>k__BackingField
|
||||||
Entry: 5
|
Entry: 5
|
||||||
Data: false
|
Data: true
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 51|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: 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: 7
|
||||||
|
Data:
|
||||||
|
- Name: $k
|
||||||
|
Entry: 1
|
||||||
|
Data: _Animator
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 53|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: _Animator
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: 54|System.RuntimeType, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 1
|
||||||
|
Data: UnityEngine.Animator, UnityEngine.AnimationModule
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 54
|
||||||
|
- 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: 55|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@ -821,13 +881,13 @@ MonoBehaviour:
|
|||||||
Data: _LootImageDownloader
|
Data: _LootImageDownloader
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 52|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 56|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _LootImageDownloader
|
Data: _LootImageDownloader
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 53|System.RuntimeType, mscorlib
|
Data: 57|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: VRC.SDK3.Image.VRCImageDownloader, VRCSDK3
|
Data: VRC.SDK3.Image.VRCImageDownloader, VRCSDK3
|
||||||
@ -836,7 +896,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 53
|
Data: 57
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@ -851,61 +911,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 54|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 58|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: _LootMaterial
|
|
||||||
- Name: $v
|
|
||||||
Entry: 7
|
|
||||||
Data: 55|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
|
||||||
- Name: <Name>k__BackingField
|
|
||||||
Entry: 1
|
|
||||||
Data: _LootMaterial
|
|
||||||
- Name: <UserType>k__BackingField
|
|
||||||
Entry: 7
|
|
||||||
Data: 56|System.RuntimeType, mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 1
|
|
||||||
Data: UnityEngine.Material, UnityEngine.CoreModule
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <SystemType>k__BackingField
|
|
||||||
Entry: 9
|
|
||||||
Data: 56
|
|
||||||
- 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: 57|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@ -929,7 +935,7 @@ MonoBehaviour:
|
|||||||
Data: _ActiveSpinners
|
Data: _ActiveSpinners
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 58|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 59|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _ActiveSpinners
|
Data: _ActiveSpinners
|
||||||
@ -953,13 +959,13 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 59|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 60|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 1
|
Data: 1
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 60|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
Data: 61|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
@ -983,13 +989,13 @@ MonoBehaviour:
|
|||||||
Data: _OrderIsCorrect
|
Data: _OrderIsCorrect
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 61|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 62|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _OrderIsCorrect
|
Data: _OrderIsCorrect
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 62|System.RuntimeType, mscorlib
|
Data: 63|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: System.Boolean[], mscorlib
|
Data: System.Boolean[], mscorlib
|
||||||
@ -998,7 +1004,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 62
|
Data: 63
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@ -1013,13 +1019,13 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 63|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 64|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 1
|
Data: 1
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 64|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
Data: 65|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
@ -1043,16 +1049,16 @@ MonoBehaviour:
|
|||||||
Data: _HasBeenCheckedBefore
|
Data: _HasBeenCheckedBefore
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 65|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 66|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _HasBeenCheckedBefore
|
Data: _HasBeenCheckedBefore
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 62
|
Data: 63
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 62
|
Data: 63
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@ -1067,13 +1073,13 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 66|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 67|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 1
|
Data: 1
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 67|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
Data: 68|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
@ -1097,13 +1103,13 @@ MonoBehaviour:
|
|||||||
Data: _RandomMaterialSettings
|
Data: _RandomMaterialSettings
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 68|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 69|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _RandomMaterialSettings
|
Data: _RandomMaterialSettings
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 69|System.RuntimeType, mscorlib
|
Data: 70|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: System.Int32[], mscorlib
|
Data: System.Int32[], mscorlib
|
||||||
@ -1112,7 +1118,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 69
|
Data: 70
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@ -1127,19 +1133,19 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 70|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 71|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 2
|
Data: 2
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 71|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
Data: 72|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 72|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
|
Data: 73|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
using System.Linq;
|
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UdonSharp;
|
using UdonSharp;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -26,11 +25,11 @@ public class LocationBoard : UdonSharpBehaviour
|
|||||||
[UdonSynced, FieldChangeCallback(nameof(WarrantLocation))] private int _WarrantLocation = 0;
|
[UdonSynced, FieldChangeCallback(nameof(WarrantLocation))] private int _WarrantLocation = 0;
|
||||||
[UdonSynced, FieldChangeCallback(nameof(CrookLocation))] private int _CrookLocation = 0;
|
[UdonSynced, FieldChangeCallback(nameof(CrookLocation))] private int _CrookLocation = 0;
|
||||||
|
|
||||||
|
[SerializeField] private Material _LootMaterial;
|
||||||
[SerializeField] private Material[] _LocationSheetMaterialSelections;
|
[SerializeField] private Material[] _LocationSheetMaterialSelections;
|
||||||
|
|
||||||
private Animator _Animator;
|
private Animator _Animator;
|
||||||
private VRCImageDownloader _LootImageDownloader;
|
private VRCImageDownloader _LootImageDownloader;
|
||||||
private Material _LootMaterial;
|
|
||||||
|
|
||||||
[UdonSynced] private int _ActiveSpinners = 0;
|
[UdonSynced] private int _ActiveSpinners = 0;
|
||||||
[UdonSynced] private bool[] _OrderIsCorrect = new bool[3];
|
[UdonSynced] private bool[] _OrderIsCorrect = new bool[3];
|
||||||
@ -47,7 +46,7 @@ public class LocationBoard : UdonSharpBehaviour
|
|||||||
MeshRenderer LootMesh;
|
MeshRenderer LootMesh;
|
||||||
if (LootMesh = _LocationPanelsLoot[0].GetComponent<MeshRenderer>())
|
if (LootMesh = _LocationPanelsLoot[0].GetComponent<MeshRenderer>())
|
||||||
{
|
{
|
||||||
_LootMaterial = LootMesh.sharedMaterial;
|
LootMesh.sharedMaterial = _LootMaterial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,8 +66,6 @@ public class LocationBoard : UdonSharpBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void GetLootImage()
|
private void GetLootImage()
|
||||||
{
|
|
||||||
if (_LootMaterial)
|
|
||||||
{
|
{
|
||||||
TextureInfo AdditionalTextureInfo = new TextureInfo();
|
TextureInfo AdditionalTextureInfo = new TextureInfo();
|
||||||
AdditionalTextureInfo.WrapModeU = TextureWrapMode.Clamp;
|
AdditionalTextureInfo.WrapModeU = TextureWrapMode.Clamp;
|
||||||
@ -78,7 +75,6 @@ public class LocationBoard : UdonSharpBehaviour
|
|||||||
_GameManager.GetLootImageURL(), _LootMaterial,
|
_GameManager.GetLootImageURL(), _LootMaterial,
|
||||||
null, AdditionalTextureInfo);
|
null, AdditionalTextureInfo);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
[NetworkCallable]
|
[NetworkCallable]
|
||||||
@ -289,16 +285,20 @@ public class LocationBoard : UdonSharpBehaviour
|
|||||||
MaterialsArray[i] = RandomValue;
|
MaterialsArray[i] = RandomValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
RandomMaterialSettings = MaterialsArray;
|
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(ApplyRandomMaterials), MaterialsArray);
|
||||||
}
|
}
|
||||||
private void ApplyRandomMaterials()
|
|
||||||
|
[NetworkCallable]
|
||||||
|
public void ApplyRandomMaterials(int[] NewMaterials)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < RandomMaterialSettings.Length; i++)
|
for (int i = 0; i < NewMaterials.Length; i++)
|
||||||
{
|
{
|
||||||
Material[] Materials = _LocationPanelInfoSheets[i].materials;
|
Material[] Materials = _LocationPanelInfoSheets[i].materials;
|
||||||
Materials[1] = _LocationSheetMaterialSelections[RandomMaterialSettings[i]];
|
Materials[1] = _LocationSheetMaterialSelections[NewMaterials[i]];
|
||||||
_LocationPanelInfoSheets[i].materials = Materials;
|
_LocationPanelInfoSheets[i].materials = Materials;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_RandomMaterialSettings = NewMaterials;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PlaceEmpty(int Panel)
|
private void PlaceEmpty(int Panel)
|
||||||
@ -390,7 +390,7 @@ public class LocationBoard : UdonSharpBehaviour
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
_RandomMaterialSettings = value;
|
_RandomMaterialSettings = value;
|
||||||
ApplyRandomMaterials();
|
ApplyRandomMaterials(value);
|
||||||
}
|
}
|
||||||
get => _RandomMaterialSettings;
|
get => _RandomMaterialSettings;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 5
|
Data: 6
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data:
|
Data:
|
||||||
@ -170,19 +170,19 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _RandomisedCountriesAndCities
|
Data: _Activate
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 10|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 10|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _RandomisedCountriesAndCities
|
Data: _Activate
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 11|System.RuntimeType, mscorlib
|
Data: 11|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: System.Int32[], mscorlib
|
Data: System.Boolean, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
@ -236,16 +236,82 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _ChosenCountries
|
Data: _RandomisedCountriesAndCities
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _ChosenCountries
|
Data: _RandomisedCountriesAndCities
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 16|System.RuntimeType, mscorlib
|
Data: 16|System.RuntimeType, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 1
|
||||||
|
Data: System.Int32[], mscorlib
|
||||||
|
- 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: 3
|
||||||
|
Data: 1
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <IsSerialized>k__BackingField
|
||||||
|
Entry: 5
|
||||||
|
Data: false
|
||||||
|
- Name: _fieldAttributes
|
||||||
|
Entry: 7
|
||||||
|
Data: 17|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 12
|
||||||
|
Data: 2
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data: 18|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data: 19|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: _ChosenCountries
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: _ChosenCountries
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: 21|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: System.String[], mscorlib
|
Data: System.String[], mscorlib
|
||||||
@ -254,7 +320,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 16
|
Data: 21
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@ -269,7 +335,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 17|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 22|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@ -293,16 +359,16 @@ MonoBehaviour:
|
|||||||
Data: _ChosenCities
|
Data: _ChosenCities
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 18|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 23|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _ChosenCities
|
Data: _ChosenCities
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 16
|
Data: 21
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 16
|
Data: 21
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@ -317,7 +383,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 19|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 24|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
using System.Linq;
|
using UnityEngine;
|
||||||
using UdonSharp;
|
using UdonSharp;
|
||||||
using VRC.SDK3.UdonNetworkCalling;
|
|
||||||
using VRC.SDKBase;
|
using VRC.SDKBase;
|
||||||
|
using VRC.SDK3.UdonNetworkCalling;
|
||||||
using VRC.Udon.Common.Interfaces;
|
using VRC.Udon.Common.Interfaces;
|
||||||
|
|
||||||
|
|
||||||
@ -12,22 +12,32 @@ public class FloorMap : UdonSharpBehaviour
|
|||||||
public FloorMapCountry[] Countries;
|
public FloorMapCountry[] Countries;
|
||||||
|
|
||||||
[UdonSynced] private int _CurrentCountry = 0;
|
[UdonSynced] private int _CurrentCountry = 0;
|
||||||
|
[UdonSynced, FieldChangeCallback(nameof(Activate))] private bool _Activate;
|
||||||
[UdonSynced, FieldChangeCallback(nameof(RandomisedCountriesAndCities))] private int[] _RandomisedCountriesAndCities;
|
[UdonSynced, FieldChangeCallback(nameof(RandomisedCountriesAndCities))] private int[] _RandomisedCountriesAndCities;
|
||||||
|
|
||||||
private string[] _ChosenCountries = new string[MAX_SELECTED_COUNTRIES];
|
private string[] _ChosenCountries = new string[MAX_SELECTED_COUNTRIES];
|
||||||
private string[] _ChosenCities = new string[MAX_SELECTED_COUNTRIES];
|
private string[] _ChosenCities = new string[MAX_SELECTED_COUNTRIES];
|
||||||
|
|
||||||
private const int MAX_SELECTED_COUNTRIES = 13;
|
private const int MAX_SELECTED_COUNTRIES = 13;
|
||||||
|
private const float DEACTIVATE_HEIGHT = -1000.0f;
|
||||||
|
|
||||||
|
|
||||||
|
private void ActivateMap()
|
||||||
|
{
|
||||||
|
transform.localPosition = Activate ? Vector3.zero : new Vector3(0.0f, DEACTIVATE_HEIGHT, 0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void RandomiseCountries()
|
public void RandomiseCountries()
|
||||||
{
|
{
|
||||||
|
Debug.Log("[FloorMap] Randomising countries...");
|
||||||
|
|
||||||
for (int i = 0; i < Countries.Length; i++)
|
for (int i = 0; i < Countries.Length; i++)
|
||||||
{
|
{
|
||||||
Countries[i].gameObject.SetActive(false);
|
Countries[i].gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
UnityEngine.Random.InitState(Networking.GetServerTimeInMilliseconds());
|
Random.InitState(Networking.GetServerTimeInMilliseconds());
|
||||||
|
|
||||||
int[] NewRandomCountries = new int[MAX_SELECTED_COUNTRIES];
|
int[] NewRandomCountries = new int[MAX_SELECTED_COUNTRIES];
|
||||||
int[] NewRandomCities = new int[MAX_SELECTED_COUNTRIES];
|
int[] NewRandomCities = new int[MAX_SELECTED_COUNTRIES];
|
||||||
@ -44,10 +54,10 @@ public class FloorMap : UdonSharpBehaviour
|
|||||||
int NewPulledIndex = NumberOfCountries;
|
int NewPulledIndex = NumberOfCountries;
|
||||||
while (CountryIsAlreadyInArray(NewRandomCountries, NewPulledIndex) || Countries[NewPulledIndex].HardModeSelection)
|
while (CountryIsAlreadyInArray(NewRandomCountries, NewPulledIndex) || Countries[NewPulledIndex].HardModeSelection)
|
||||||
{
|
{
|
||||||
NewPulledIndex = UnityEngine.Random.Range(0, NumberOfCountries);
|
NewPulledIndex = Random.Range(0, NumberOfCountries);
|
||||||
}
|
}
|
||||||
NewRandomCountries[i] = NewPulledIndex;
|
NewRandomCountries[i] = NewPulledIndex;
|
||||||
NewRandomCities[i] = UnityEngine.Random.Range(0, Countries[NewPulledIndex].Locations.Length);
|
NewRandomCities[i] = Random.Range(0, Countries[NewPulledIndex].Locations.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We're syncing the countries and cities as one array to keep
|
// We're syncing the countries and cities as one array to keep
|
||||||
@ -57,7 +67,8 @@ public class FloorMap : UdonSharpBehaviour
|
|||||||
NewRandomCountries.CopyTo(RandomCountriesAndCities, 0);
|
NewRandomCountries.CopyTo(RandomCountriesAndCities, 0);
|
||||||
NewRandomCities.CopyTo(RandomCountriesAndCities, MAX_SELECTED_COUNTRIES);
|
NewRandomCities.CopyTo(RandomCountriesAndCities, MAX_SELECTED_COUNTRIES);
|
||||||
|
|
||||||
RandomisedCountriesAndCities = RandomCountriesAndCities;
|
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(AssignRandomCountriesAndCities), RandomCountriesAndCities);
|
||||||
|
|
||||||
RequestSerialization();
|
RequestSerialization();
|
||||||
}
|
}
|
||||||
private bool CountryIsAlreadyInArray(int[] Countries, int IndexToCheck)
|
private bool CountryIsAlreadyInArray(int[] Countries, int IndexToCheck)
|
||||||
@ -72,7 +83,8 @@ public class FloorMap : UdonSharpBehaviour
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AssignRandomCountriesAndCities(int[] RandomisedCountriesAndCities)
|
[NetworkCallable]
|
||||||
|
public void AssignRandomCountriesAndCities(int[] NewCountrySelections)
|
||||||
{
|
{
|
||||||
DisableAllLocations();
|
DisableAllLocations();
|
||||||
|
|
||||||
@ -80,15 +92,17 @@ public class FloorMap : UdonSharpBehaviour
|
|||||||
|
|
||||||
for (int i = 0; i < MAX_SELECTED_COUNTRIES; i++)
|
for (int i = 0; i < MAX_SELECTED_COUNTRIES; i++)
|
||||||
{
|
{
|
||||||
FloorMapCountry Country = Countries[RandomisedCountriesAndCities[i]];
|
FloorMapCountry Country = Countries[NewCountrySelections[i]];
|
||||||
Country.gameObject.SetActive(true);
|
Country.gameObject.SetActive(true);
|
||||||
|
|
||||||
FloorMapLocation Location = Country.Locations[RandomisedCountriesAndCities[MAX_SELECTED_COUNTRIES + i]];
|
FloorMapLocation Location = Country.Locations[NewCountrySelections[MAX_SELECTED_COUNTRIES + i]];
|
||||||
Location.gameObject.SetActive(true);
|
Location.gameObject.SetActive(true);
|
||||||
|
|
||||||
_ChosenCountries[i] = Location.Country;
|
_ChosenCountries[i] = Location.Country;
|
||||||
_ChosenCities[i] = Location.City;
|
_ChosenCities[i] = Location.City;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_RandomisedCountriesAndCities = NewCountrySelections;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int NextCountry()
|
public int NextCountry()
|
||||||
@ -136,12 +150,22 @@ public class FloorMap : UdonSharpBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool Activate
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_Activate = value;
|
||||||
|
ActivateMap();
|
||||||
|
}
|
||||||
|
get => _Activate;
|
||||||
|
}
|
||||||
|
|
||||||
public int[] RandomisedCountriesAndCities
|
public int[] RandomisedCountriesAndCities
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_RandomisedCountriesAndCities = value;
|
_RandomisedCountriesAndCities = value;
|
||||||
AssignRandomCountriesAndCities(_RandomisedCountriesAndCities);
|
AssignRandomCountriesAndCities(value);
|
||||||
}
|
}
|
||||||
get => _RandomisedCountriesAndCities;
|
get => _RandomisedCountriesAndCities;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 12
|
Data: 14
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data:
|
Data:
|
||||||
@ -362,13 +362,13 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _LocationFindingEnabled
|
Data: _IsLit
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _LocationFindingEnabled
|
Data: _IsLit
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 15
|
Data: 15
|
||||||
@ -392,13 +392,19 @@ MonoBehaviour:
|
|||||||
Data: 25|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 25|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 1
|
Data: 2
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 26|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
Data: 26|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data: 27|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 13
|
Entry: 13
|
||||||
Data:
|
Data:
|
||||||
@ -416,31 +422,25 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _CollisionCheckCounter
|
Data: _LocationFindingEnabled
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 27|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 28|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _CollisionCheckCounter
|
Data: _LocationFindingEnabled
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 9
|
||||||
Data: 28|System.RuntimeType, mscorlib
|
Data: 15
|
||||||
- Name:
|
|
||||||
Entry: 1
|
|
||||||
Data: System.Int32, mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 28
|
Data: 15
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 6
|
Entry: 3
|
||||||
Data:
|
Data: 1
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
@ -450,6 +450,66 @@ MonoBehaviour:
|
|||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 29|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 29|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 12
|
||||||
|
Data: 1
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data: 30|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: _CollisionCheckCounter
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 31|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: _CollisionCheckCounter
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: 32|System.RuntimeType, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 1
|
||||||
|
Data: System.Int32, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 32
|
||||||
|
- 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: 33|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@ -473,16 +533,16 @@ MonoBehaviour:
|
|||||||
Data: _NoCollisionCounter
|
Data: _NoCollisionCounter
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 30|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _NoCollisionCounter
|
Data: _NoCollisionCounter
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 28
|
Data: 32
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 28
|
Data: 32
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@ -497,7 +557,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 31|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 35|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@ -521,13 +581,13 @@ MonoBehaviour:
|
|||||||
Data: _CollidingLocations
|
Data: _CollidingLocations
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 32|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _CollidingLocations
|
Data: _CollidingLocations
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 33|System.RuntimeType, mscorlib
|
Data: 37|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: VRC.SDK3.Data.DataList, VRCSDK3
|
Data: VRC.SDK3.Data.DataList, VRCSDK3
|
||||||
@ -536,7 +596,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 33
|
Data: 37
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@ -551,7 +611,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 34|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 38|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@ -575,13 +635,13 @@ MonoBehaviour:
|
|||||||
Data: _RigidBodyComponent
|
Data: _RigidBodyComponent
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 35|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _RigidBodyComponent
|
Data: _RigidBodyComponent
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 36|System.RuntimeType, mscorlib
|
Data: 40|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: UnityEngine.Rigidbody, UnityEngine.PhysicsModule
|
Data: UnityEngine.Rigidbody, UnityEngine.PhysicsModule
|
||||||
@ -590,7 +650,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 36
|
Data: 40
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@ -605,7 +665,61 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
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: 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: _ObjectSync
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 42|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: _ObjectSync
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: 43|System.RuntimeType, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 1
|
||||||
|
Data: MMMaellon.LightSync.LightSync, com.mmmaellon.lightsync
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 4
|
||||||
|
- Name: <SyncMode>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 6
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <IsSerialized>k__BackingField
|
||||||
|
Entry: 5
|
||||||
|
Data: false
|
||||||
|
- Name: _fieldAttributes
|
||||||
|
Entry: 7
|
||||||
|
Data: 44|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@ -629,13 +743,13 @@ MonoBehaviour:
|
|||||||
Data: _PickupComponent
|
Data: _PickupComponent
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 38|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 45|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _PickupComponent
|
Data: _PickupComponent
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 39|System.RuntimeType, mscorlib
|
Data: 46|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: VRC.SDK3.Components.VRCPickup, VRCSDK3
|
Data: VRC.SDK3.Components.VRCPickup, VRCSDK3
|
||||||
@ -644,7 +758,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 39
|
Data: 46
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@ -659,7 +773,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 40|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 47|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@ -683,13 +797,13 @@ MonoBehaviour:
|
|||||||
Data: _MarkerMesh
|
Data: _MarkerMesh
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 41|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 48|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _MarkerMesh
|
Data: _MarkerMesh
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 42|System.RuntimeType, mscorlib
|
Data: 49|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: UnityEngine.MeshRenderer, UnityEngine.CoreModule
|
Data: UnityEngine.MeshRenderer, UnityEngine.CoreModule
|
||||||
@ -698,7 +812,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 42
|
Data: 49
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@ -713,7 +827,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 43|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 50|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
using MMMaellon.LightSync;
|
||||||
using UdonSharp;
|
using UdonSharp;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using VRC.SDK3.Components;
|
using VRC.SDK3.Components;
|
||||||
@ -18,6 +19,7 @@ public class FloorMapMarker : UdonSharpBehaviour
|
|||||||
|
|
||||||
[UdonSynced, SerializeField, FieldChangeCallback(nameof(Active))] private bool _Active = false;
|
[UdonSynced, SerializeField, FieldChangeCallback(nameof(Active))] private bool _Active = false;
|
||||||
[UdonSynced, FieldChangeCallback(nameof(IsGrabbed))] private bool _IsGrabbed = false;
|
[UdonSynced, FieldChangeCallback(nameof(IsGrabbed))] private bool _IsGrabbed = false;
|
||||||
|
[UdonSynced, FieldChangeCallback(nameof(IsLit))] private bool _IsLit = false;
|
||||||
[UdonSynced] private bool _LocationFindingEnabled = false;
|
[UdonSynced] private bool _LocationFindingEnabled = false;
|
||||||
|
|
||||||
private int _CollisionCheckCounter = 0;
|
private int _CollisionCheckCounter = 0;
|
||||||
@ -25,6 +27,7 @@ public class FloorMapMarker : UdonSharpBehaviour
|
|||||||
private DataList _CollidingLocations = new DataList();
|
private DataList _CollidingLocations = new DataList();
|
||||||
|
|
||||||
private Rigidbody _RigidBodyComponent;
|
private Rigidbody _RigidBodyComponent;
|
||||||
|
private LightSync _ObjectSync;
|
||||||
private VRCPickup _PickupComponent;
|
private VRCPickup _PickupComponent;
|
||||||
private MeshRenderer _MarkerMesh;
|
private MeshRenderer _MarkerMesh;
|
||||||
|
|
||||||
@ -36,10 +39,34 @@ public class FloorMapMarker : UdonSharpBehaviour
|
|||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
_RigidBodyComponent = GetComponent<Rigidbody>();
|
_RigidBodyComponent = GetComponent<Rigidbody>();
|
||||||
|
_ObjectSync = GetComponent<LightSync>();
|
||||||
_PickupComponent = GetComponent<VRCPickup>();
|
_PickupComponent = GetComponent<VRCPickup>();
|
||||||
_MarkerMesh = GetComponent<MeshRenderer>();
|
_MarkerMesh = GetComponent<MeshRenderer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Initialise()
|
||||||
|
{
|
||||||
|
_ObjectSync.TeleportToLocalSpace(Vector3.zero, Quaternion.identity, true);
|
||||||
|
SetPickupable(false);
|
||||||
|
|
||||||
|
Active = false;
|
||||||
|
IsGrabbed = false;
|
||||||
|
IsLit = false;
|
||||||
|
_LocationFindingEnabled = false;
|
||||||
|
|
||||||
|
_CollisionCheckCounter = 0;
|
||||||
|
_NoCollisionCounter = 0;
|
||||||
|
_CollidingLocations.Clear();
|
||||||
|
|
||||||
|
RequestSerialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetPickupable(bool Pickupable)
|
||||||
|
{
|
||||||
|
_PickupComponent.pickupable = Pickupable;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void OnTriggerEnter(Collider OtherCollider)
|
public void OnTriggerEnter(Collider OtherCollider)
|
||||||
{
|
{
|
||||||
FloorMapLocation Location = OtherCollider.GetComponent<FloorMapLocation>();
|
FloorMapLocation Location = OtherCollider.GetComponent<FloorMapLocation>();
|
||||||
@ -83,6 +110,13 @@ public class FloorMapMarker : UdonSharpBehaviour
|
|||||||
base.OnDrop();
|
base.OnDrop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SwapLampMaterial()
|
||||||
|
{
|
||||||
|
Material[] Materials = _MarkerMesh.materials;
|
||||||
|
Materials[2] = IsLit ? _LitLampMaterial : _UnlitLampMaterial;
|
||||||
|
_MarkerMesh.materials = Materials;
|
||||||
|
}
|
||||||
|
|
||||||
private void ReactToGrab()
|
private void ReactToGrab()
|
||||||
{
|
{
|
||||||
if (IsGrabbed)
|
if (IsGrabbed)
|
||||||
@ -178,10 +212,9 @@ public class FloorMapMarker : UdonSharpBehaviour
|
|||||||
{
|
{
|
||||||
DisableMovementCompletely(CorrectLocation);
|
DisableMovementCompletely(CorrectLocation);
|
||||||
|
|
||||||
Material[] Materials = _MarkerMesh.materials;
|
IsLit = true;
|
||||||
Materials[2] = _LitLampMaterial;
|
|
||||||
_MarkerMesh.materials = Materials;
|
|
||||||
|
|
||||||
|
RequestSerialization();
|
||||||
_GameManager.CorrectResponse();
|
_GameManager.CorrectResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,6 +227,8 @@ public class FloorMapMarker : UdonSharpBehaviour
|
|||||||
|
|
||||||
_CollisionCheckCounter = 0;
|
_CollisionCheckCounter = 0;
|
||||||
_CollidingLocations.Clear();
|
_CollidingLocations.Clear();
|
||||||
|
|
||||||
|
RequestSerialization();
|
||||||
}
|
}
|
||||||
|
|
||||||
[NetworkCallable]
|
[NetworkCallable]
|
||||||
@ -247,4 +282,14 @@ public class FloorMapMarker : UdonSharpBehaviour
|
|||||||
}
|
}
|
||||||
get => _IsGrabbed;
|
get => _IsGrabbed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool IsLit
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_IsLit = value;
|
||||||
|
SwapLampMaterial();
|
||||||
|
}
|
||||||
|
get => _IsLit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||||
m_Name: BoneFollower
|
m_Name: BoneFollower
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 52ecc8a73071e8e40928c3609699fcf4,
|
serializedUdonProgramAsset: {fileID: 11400000, guid: ccbda9bf23e2f714c9226283c77a92e5,
|
||||||
type: 2}
|
type: 2}
|
||||||
udonAssembly:
|
udonAssembly:
|
||||||
assemblyError:
|
assemblyError:
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||||
m_Name: InteractToggle
|
m_Name: InteractToggle
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 873dfce61b1514e429c92e0d2fded7de,
|
serializedUdonProgramAsset: {fileID: 11400000, guid: 405e38d3dfb2f514daeed0e28fbb4864,
|
||||||
type: 2}
|
type: 2}
|
||||||
udonAssembly:
|
udonAssembly:
|
||||||
assemblyError:
|
assemblyError:
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||||
m_Name: PlayerModSetter
|
m_Name: PlayerModSetter
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
serializedUdonProgramAsset: {fileID: 11400000, guid: e81558796a212ab4d88e305e2010f24b,
|
serializedUdonProgramAsset: {fileID: 11400000, guid: f938e6c4ff027a74da405a1f9353fd2b,
|
||||||
type: 2}
|
type: 2}
|
||||||
udonAssembly:
|
udonAssembly:
|
||||||
assemblyError:
|
assemblyError:
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||||
m_Name: GlobalToggleObject
|
m_Name: GlobalToggleObject
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 2fe8ced6184000f49bca526cd2c5891c,
|
serializedUdonProgramAsset: {fileID: 11400000, guid: c49c9265a3ef24642a6a4465d0a78872,
|
||||||
type: 2}
|
type: 2}
|
||||||
udonAssembly:
|
udonAssembly:
|
||||||
assemblyError:
|
assemblyError:
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||||
m_Name: MasterToggleObject
|
m_Name: MasterToggleObject
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
serializedUdonProgramAsset: {fileID: 11400000, guid: a2d01d9f36ac6df49831be249e48ecc4,
|
serializedUdonProgramAsset: {fileID: 11400000, guid: 04024a76ab1924042ba521e11cb76d91,
|
||||||
type: 2}
|
type: 2}
|
||||||
udonAssembly:
|
udonAssembly:
|
||||||
assemblyError:
|
assemblyError:
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||||
m_Name: TrackingDataFollower
|
m_Name: TrackingDataFollower
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 1b89d4552983c0448a7389decec3b555,
|
serializedUdonProgramAsset: {fileID: 11400000, guid: 17f8fbbe6cc186d4f8dbb057b01a4ec2,
|
||||||
type: 2}
|
type: 2}
|
||||||
udonAssembly:
|
udonAssembly:
|
||||||
assemblyError:
|
assemblyError:
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||||
m_Name: WorldAudioSettings
|
m_Name: WorldAudioSettings
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 994b559b0f158b4499f8937980ed8694,
|
serializedUdonProgramAsset: {fileID: 11400000, guid: 128d924a3066b7546b2d1c73e61006ab,
|
||||||
type: 2}
|
type: 2}
|
||||||
udonAssembly:
|
udonAssembly:
|
||||||
assemblyError:
|
assemblyError:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user