- Modem and destination sign now correctly sync for all players.
- Case Manager now ensures proper ownership for whoever loads the case file.
This commit is contained in:
@@ -44,25 +44,25 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
Data: 4
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _Display
|
||||
Data: _Sign
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Display
|
||||
Data: _Sign
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 3|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
|
||||
Data: UnityEngine.GameObject, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -105,6 +105,198 @@ MonoBehaviour:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _Display
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Display
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 7|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: TMPro.TextMeshProUGUI, Unity.TextMeshPro
|
||||
- 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: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 9|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: _ActivateSign
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 10|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ActivateSign
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 11|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 11
|
||||
- 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: _DisplayText
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _DisplayText
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 16|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.String, 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: 13
|
||||
Data:
|
||||
|
||||
@@ -9,10 +9,43 @@ using VRC.Udon;
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
public class ArrivalDisplay : UdonSharpBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject _Sign;
|
||||
[SerializeField] private TextMeshProUGUI _Display;
|
||||
|
||||
public void SetDisplay(string Text)
|
||||
[UdonSynced, FieldChangeCallback(nameof(ActivateSign))] private bool _ActivateSign;
|
||||
[UdonSynced, FieldChangeCallback(nameof(DisplayText))] private string _DisplayText;
|
||||
|
||||
|
||||
public void Activate(bool Active)
|
||||
{
|
||||
ActivateSign = Active;
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
public void SetDisplayText(string Text)
|
||||
{
|
||||
_Display.text = Text;
|
||||
}
|
||||
DisplayText = Text;
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
|
||||
private bool ActivateSign
|
||||
{
|
||||
set
|
||||
{
|
||||
_ActivateSign = value;
|
||||
_Sign.SetActive(_ActivateSign);
|
||||
}
|
||||
get => _ActivateSign;
|
||||
}
|
||||
|
||||
private string DisplayText
|
||||
{
|
||||
set
|
||||
{
|
||||
_DisplayText = value;
|
||||
_Display.text = _DisplayText;
|
||||
}
|
||||
get => _DisplayText;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,12 @@ public class CaseManager : UdonSharpBehaviour
|
||||
|
||||
public void LoadCaseFile(CaseManagerListEntry CaseFile)
|
||||
{
|
||||
Networking.SetOwner(Networking.LocalPlayer, gameObject);
|
||||
Networking.SetOwner(Networking.LocalPlayer, _Round1Manager.gameObject);
|
||||
Networking.SetOwner(Networking.LocalPlayer, _Round2Manager.gameObject);
|
||||
Networking.SetOwner(Networking.LocalPlayer, _Round3Manager.gameObject);
|
||||
Networking.SetOwner(Networking.LocalPlayer, _HostCard.gameObject);
|
||||
|
||||
_CaseFileCluesURL = CaseFile.CaseFileURL;
|
||||
_CaseFileLootImage = CaseFile.LootImage;
|
||||
_CaseFileMaps = CaseFile.MapFiles;
|
||||
|
||||
@@ -63,11 +63,13 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
_PlayerBuzzInAllowed = new bool[_PlayerPodiums.Length];
|
||||
|
||||
_Modem.ResetModem();
|
||||
_Modem.gameObject.SetActive(false);
|
||||
_ArrivalDisplay.gameObject.SetActive(false);
|
||||
Networking.SetOwner(Networking.GetOwner(gameObject), _Modem.gameObject);
|
||||
_Modem.Activate(false);
|
||||
|
||||
_LightningRoundAnimator.SetBool("Lightning", false);
|
||||
Networking.SetOwner(Networking.GetOwner(gameObject), _ArrivalDisplay.gameObject);
|
||||
_ArrivalDisplay.Activate(false);
|
||||
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(ResetLightningRoundAnimation));
|
||||
|
||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All, "PlayMusic", MusicEventType.WhereInTheWorld);
|
||||
SendCustomEventDelayedSeconds(nameof(PlaySecondPartOfThemeMusic), 3.6666666666f);
|
||||
@@ -515,7 +517,7 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
private void BeginLightningRound()
|
||||
{
|
||||
_LightningRoundAnimator.SetBool("Lightning", true);
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(PlayLightningRoundAnimation));
|
||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All, "PlaySFX", SFXEventType.Thunder);
|
||||
|
||||
HostCardLightningRoundInterface Interface =
|
||||
@@ -532,6 +534,16 @@ public class GameManagerRound1 : GameManagerBase
|
||||
|
||||
EnableInteraction("First Question");
|
||||
}
|
||||
[NetworkCallable]
|
||||
public void PlayLightningRoundAnimation()
|
||||
{
|
||||
_LightningRoundAnimator.SetBool("Lightning", true);
|
||||
}
|
||||
[NetworkCallable]
|
||||
public void ResetLightningRoundAnimation()
|
||||
{
|
||||
_LightningRoundAnimator.SetBool("Lightning", false);
|
||||
}
|
||||
|
||||
private void LightningRoundCluesLoop()
|
||||
{
|
||||
@@ -1146,15 +1158,15 @@ public class GameManagerRound1 : GameManagerBase
|
||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
|
||||
"PlayMusicLoop", MusicEventType.CapitalLoop);
|
||||
|
||||
_Modem.gameObject.SetActive(true);
|
||||
_ArrivalDisplay.gameObject.SetActive(true);
|
||||
_Modem.Activate(true);
|
||||
_ArrivalDisplay.Activate(true);
|
||||
|
||||
EnableInteraction("Activate Modem");
|
||||
}
|
||||
|
||||
private void ActivateModem()
|
||||
{
|
||||
_Modem.BeginTeleportProcess();
|
||||
_Modem.Teleport();
|
||||
SendCustomEventDelayedSeconds(nameof(_ContinueToRound2_Private), 5.0f);
|
||||
}
|
||||
public void _ContinueToRound2_Private()
|
||||
|
||||
@@ -367,7 +367,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
set
|
||||
{
|
||||
_Location = value;
|
||||
_ArrivalDisplay.SetDisplay(_Location);
|
||||
_ArrivalDisplay.SetDisplayText(_Location);
|
||||
}
|
||||
get => _Location;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,193 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 5
|
||||
Data: 8
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _ActivateModem
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ActivateModem
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 3|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 3
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 3
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: 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: _BeginTeleport
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 7|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _BeginTeleport
|
||||
- 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: _ModemActivationObject
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ModemActivationObject
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 12|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.GameObject, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 12
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 13|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 14|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
@@ -53,13 +239,13 @@ MonoBehaviour:
|
||||
Data: _ModemDestination
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ModemDestination
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 3|System.RuntimeType, mscorlib
|
||||
Data: 16|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: Modem, Assembly-CSharp
|
||||
@@ -68,7 +254,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 4|System.RuntimeType, mscorlib
|
||||
Data: 17|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: VRC.Udon.UdonBehaviour, VRC.Udon
|
||||
@@ -89,13 +275,13 @@ MonoBehaviour:
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 5|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 18|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 6|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
Data: 19|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -119,13 +305,13 @@ MonoBehaviour:
|
||||
Data: _AudioManager
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 7|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _AudioManager
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 8|System.RuntimeType, mscorlib
|
||||
Data: 21|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: AudioManager, Assembly-CSharp
|
||||
@@ -134,7 +320,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 4
|
||||
Data: 17
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -149,13 +335,13 @@ MonoBehaviour:
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 9|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 22|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 2
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 10|UnityEngine.SpaceAttribute, UnityEngine.CoreModule
|
||||
Data: 23|UnityEngine.SpaceAttribute, UnityEngine.CoreModule
|
||||
- Name: height
|
||||
Entry: 4
|
||||
Data: 8
|
||||
@@ -164,7 +350,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 11|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
Data: 24|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -188,13 +374,13 @@ MonoBehaviour:
|
||||
Data: _ModemAnimator
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 12|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 25|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ModemAnimator
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 13|System.RuntimeType, mscorlib
|
||||
Data: 26|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.Animator, UnityEngine.AnimationModule
|
||||
@@ -203,7 +389,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
Data: 26
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -218,13 +404,13 @@ MonoBehaviour:
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 14|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 27|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 15|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
Data: 28|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -248,16 +434,16 @@ MonoBehaviour:
|
||||
Data: _ModemDestinationAnimator
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 16|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 29|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ModemDestinationAnimator
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
Data: 26
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
Data: 26
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -272,13 +458,13 @@ MonoBehaviour:
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 17|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 30|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 18|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
Data: 31|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -302,13 +488,13 @@ MonoBehaviour:
|
||||
Data: _EnteredPlayers
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 19|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 32|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _EnteredPlayers
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 20|System.RuntimeType, mscorlib
|
||||
Data: 33|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.String[], mscorlib
|
||||
@@ -317,7 +503,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 20
|
||||
Data: 33
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -332,13 +518,13 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 21|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 34|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 22|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
Data: 35|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
|
||||
@@ -10,6 +10,10 @@ using VRC.Udon.Common.Interfaces;
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
public class Modem : UdonSharpBehaviour
|
||||
{
|
||||
[UdonSynced, FieldChangeCallback(nameof(ActivateModem))] private bool _ActivateModem = false;
|
||||
[UdonSynced, FieldChangeCallback(nameof(BeginTeleport))] private bool _BeginTeleport = false;
|
||||
|
||||
[SerializeField] private GameObject _ModemActivationObject;
|
||||
[SerializeField] private Modem _ModemDestination;
|
||||
|
||||
[Space]
|
||||
@@ -23,13 +27,6 @@ public class Modem : UdonSharpBehaviour
|
||||
|
||||
|
||||
|
||||
public void ResetModem()
|
||||
{
|
||||
_ModemAnimator.SetBool("Teleport", false);
|
||||
_ModemDestinationAnimator.SetBool("Teleport", false);
|
||||
}
|
||||
|
||||
|
||||
public override void OnPlayerTriggerEnter(VRCPlayerApi Player)
|
||||
{
|
||||
for (int i = 0; i < MAX_PLAYERS_IN_MODEM; i++)
|
||||
@@ -61,28 +58,49 @@ public class Modem : UdonSharpBehaviour
|
||||
}
|
||||
|
||||
|
||||
public void BeginTeleportProcess()
|
||||
public void Activate(bool Active)
|
||||
{
|
||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
|
||||
"PlaySFX", SFXEventType.ModemOperation);
|
||||
ActivateModem = Active;
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
public void Teleport()
|
||||
{
|
||||
BeginTeleport = true;
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
private void ExecuteTeleportProcess()
|
||||
{
|
||||
// This is a synced function, so only play the sound effect locally.
|
||||
_AudioManager.PlaySFX(SFXEventType.ModemOperation);
|
||||
|
||||
_ModemAnimator.SetBool("Teleport", true);
|
||||
_ModemDestinationAnimator.SetBool("Teleport", true);
|
||||
|
||||
SendCustomEventDelayedSeconds(nameof(TeleportAllPlayers), 4.0f);
|
||||
SendCustomEventDelayedSeconds(nameof(ResetAnimations), 6.0f);
|
||||
SendCustomEventDelayedSeconds(nameof(EndTeleport), 6.0f);
|
||||
}
|
||||
|
||||
public void TeleportAllPlayers()
|
||||
{
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(TeleportLocalPlayerIfInModem));
|
||||
// Only the Modem owner should execute teleportations.
|
||||
if (Networking.GetOwner(gameObject) == Networking.LocalPlayer)
|
||||
{
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(TeleportLocalPlayerIfInModem));
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetAnimations()
|
||||
public void ResetTeleportProcess()
|
||||
{
|
||||
_ModemAnimator.SetBool("Teleport", false);
|
||||
_ModemDestinationAnimator.SetBool("Teleport", false);
|
||||
}
|
||||
public void EndTeleport()
|
||||
{
|
||||
BeginTeleport = false;
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
|
||||
[NetworkCallable]
|
||||
@@ -110,4 +128,32 @@ public class Modem : UdonSharpBehaviour
|
||||
_ModemDestination.transform.position + DestinationPositionDelta,
|
||||
DeltaRotation * Networking.LocalPlayer.GetRotation());
|
||||
}
|
||||
|
||||
|
||||
private bool ActivateModem
|
||||
{
|
||||
set
|
||||
{
|
||||
_ActivateModem = value;
|
||||
_ModemActivationObject.SetActive(_ActivateModem);
|
||||
}
|
||||
get => _ActivateModem;
|
||||
}
|
||||
|
||||
private bool BeginTeleport
|
||||
{
|
||||
set
|
||||
{
|
||||
_BeginTeleport = value;
|
||||
if (_BeginTeleport)
|
||||
{
|
||||
ExecuteTeleportProcess();
|
||||
}
|
||||
else
|
||||
{
|
||||
ResetTeleportProcess();
|
||||
}
|
||||
}
|
||||
get => _BeginTeleport;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: BoneFollower
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 52ecc8a73071e8e40928c3609699fcf4,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: ccbda9bf23e2f714c9226283c77a92e5,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: InteractToggle
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 873dfce61b1514e429c92e0d2fded7de,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 405e38d3dfb2f514daeed0e28fbb4864,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: PlayerModSetter
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: e81558796a212ab4d88e305e2010f24b,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: f938e6c4ff027a74da405a1f9353fd2b,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: GlobalToggleObject
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 2fe8ced6184000f49bca526cd2c5891c,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: c49c9265a3ef24642a6a4465d0a78872,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: MasterToggleObject
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: a2d01d9f36ac6df49831be249e48ecc4,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 04024a76ab1924042ba521e11cb76d91,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: TrackingDataFollower
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 1b89d4552983c0448a7389decec3b555,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 17f8fbbe6cc186d4f8dbb057b01a4ec2,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: WorldAudioSettings
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 994b559b0f158b4499f8937980ed8694,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 128d924a3066b7546b2d1c73e61006ab,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
Reference in New Issue
Block a user