- CameraAnchor can now have camera rotation offsets as well as FOV changes.
- CameraAnchor no longer needs to sync with LightSync, and so does not. - Added noise texture to velvet rope material. - Improved lightmaps on velvet rope model. - Round 1 podiums now return empty strings when no player owns them. - Winning player camera in round 2 now has rotation offset for a later effect. - Jail phone syncs active status better, and finds a player to follow better.
This commit is contained in:
@@ -293,13 +293,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: CameraRoot
|
||||
Data: _CameraRoot
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 18|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: CameraRoot
|
||||
Data: _CameraRoot
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 19|System.RuntimeType, mscorlib
|
||||
@@ -362,13 +362,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: CameraFOVScaler
|
||||
Data: _CameraModifier
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 23|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: CameraFOVScaler
|
||||
Data: _CameraModifier
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 19
|
||||
@@ -398,8 +398,11 @@ MonoBehaviour:
|
||||
Data: 25|UnityEngine.TooltipAttribute, UnityEngine.CoreModule
|
||||
- Name: tooltip
|
||||
Entry: 1
|
||||
Data: Changing the Z scale of this object will change the FOV of the attached
|
||||
camera.
|
||||
Data: 'Changing the position and rotation of this object will change the position/rotation
|
||||
offset of the attached camera.
|
||||
|
||||
Changing the Z scale of this object
|
||||
will change the FOV of the attached camera.'
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
|
||||
using CameraSystem;
|
||||
using MMMaellon.LightSync;
|
||||
using System.Linq;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDKBase;
|
||||
@@ -28,9 +26,9 @@ public class CameraAnchor : UdonSharpBehaviour
|
||||
[SerializeField] private float NearClippingPlane = 0.3f;
|
||||
[SerializeField] private float FarClippingPlane = 1000.0f;
|
||||
[Space]
|
||||
[SerializeField] private Transform CameraRoot;
|
||||
[Tooltip("Changing the Z scale of this object will change the FOV of the attached camera.")]
|
||||
[SerializeField] private Transform CameraFOVScaler;
|
||||
[SerializeField] private Transform _CameraRoot;
|
||||
[Tooltip("Changing the position and rotation of this object will change the position/rotation offset of the attached camera.\nChanging the Z scale of this object will change the FOV of the attached camera.")]
|
||||
[SerializeField] private Transform _CameraModifier;
|
||||
[Space]
|
||||
[Tooltip("How the camera should follow players, if it's set to do so.")]
|
||||
[SerializeField] private PossibleFollowMethods FollowMethod;
|
||||
@@ -49,7 +47,7 @@ public class CameraAnchor : UdonSharpBehaviour
|
||||
{
|
||||
if (_AttachedCamera)
|
||||
{
|
||||
if (_AttachedCamera.transform.parent != CameraRoot)
|
||||
if (_AttachedCamera.transform.parent != _CameraRoot)
|
||||
{
|
||||
Debug.Log("[CameraAnchor] Camera has been detached from " + gameObject.name + ".");
|
||||
_AttachedCamera = null;
|
||||
@@ -58,7 +56,15 @@ public class CameraAnchor : UdonSharpBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
_AttachedCamera.fieldOfView = FOV * CameraFOVScaler.transform.localScale.z;
|
||||
_AttachedCamera.transform.localPosition = Vector3.Lerp(
|
||||
_AttachedCamera.transform.localPosition,
|
||||
_CameraModifier.localPosition,
|
||||
_CameraFollowSpeed / 10.0f);
|
||||
_AttachedCamera.transform.localRotation = Quaternion.Lerp(
|
||||
_AttachedCamera.transform.localRotation,
|
||||
_CameraModifier.localRotation,
|
||||
_CameraFollowSpeed / 10.0f);
|
||||
_AttachedCamera.fieldOfView = FOV * _CameraModifier.localScale.z;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,16 +90,16 @@ public class CameraAnchor : UdonSharpBehaviour
|
||||
Vector3 CentroidAverage = CentroidSum / _FollowedPlayers.Length;
|
||||
|
||||
Vector3 LookDirection = (CentroidAverage - transform.position).normalized;
|
||||
CameraRoot.transform.rotation = Quaternion.LookRotation(
|
||||
_CameraRoot.transform.rotation = Quaternion.LookRotation(
|
||||
Vector3.Lerp(
|
||||
CameraRoot.transform.forward,
|
||||
Vector3.RotateTowards(CameraRoot.transform.forward, LookDirection, 10.0f, 0.0f),
|
||||
_CameraRoot.transform.forward,
|
||||
Vector3.RotateTowards(_CameraRoot.transform.forward, LookDirection, 10.0f, 0.0f),
|
||||
_CameraFollowSpeed / 10.0f)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
CameraRoot.transform.localRotation = Quaternion.identity;
|
||||
_CameraRoot.transform.localRotation = Quaternion.identity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,8 +254,9 @@ public class CameraAnchor : UdonSharpBehaviour
|
||||
_AttachedCamera.fieldOfView = FOV;
|
||||
_AttachedCamera.nearClipPlane = NearClippingPlane;
|
||||
_AttachedCamera.farClipPlane = FarClippingPlane;
|
||||
_AttachedCamera.transform.parent = CameraRoot;
|
||||
_AttachedCamera.GetComponent<LightSync>().TeleportToLocalSpace(Vector3.zero, Quaternion.identity, true);
|
||||
_AttachedCamera.transform.parent = _CameraRoot;
|
||||
_AttachedCamera.transform.localPosition = _CameraModifier.localPosition;
|
||||
_AttachedCamera.transform.localRotation = _CameraModifier.localRotation;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 32
|
||||
Data: 31
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
@@ -1448,19 +1448,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _Players
|
||||
Data: _RoundIsOver
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 95|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Players
|
||||
Data: _RoundIsOver
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 85
|
||||
Data: 42
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 85
|
||||
Data: 42
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -1502,70 +1502,16 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _RoundIsOver
|
||||
Data: _CameraControllerRound2
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 98|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _RoundIsOver
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 42
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 42
|
||||
- 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: 99|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 100|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: _CameraControllerRound2
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 101|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _CameraControllerRound2
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 102|System.RuntimeType, mscorlib
|
||||
Data: 99|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: CameraControllerRound2, Assembly-CSharp
|
||||
@@ -1589,7 +1535,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 103|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
|
||||
Data: 100|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
|
||||
mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
@@ -1614,7 +1560,7 @@ MonoBehaviour:
|
||||
Data: _PlayingJailCall
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 104|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 101|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _PlayingJailCall
|
||||
@@ -1638,7 +1584,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 105|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
|
||||
Data: 102|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
|
||||
mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
@@ -1663,7 +1609,7 @@ MonoBehaviour:
|
||||
Data: _PanelToReveal_Cache
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 106|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 103|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _PanelToReveal_Cache
|
||||
@@ -1685,6 +1631,61 @@ MonoBehaviour:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 104|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: COLOR_STANDARD
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 105|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: COLOR_STANDARD
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 106|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.Color, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 106
|
||||
- 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: 107|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
|
||||
@@ -1709,25 +1710,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: COLOR_STANDARD
|
||||
Data: COLOR_RED
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 108|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: COLOR_STANDARD
|
||||
Data: COLOR_RED
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 109|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.Color, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
Entry: 9
|
||||
Data: 106
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 109
|
||||
Data: 106
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -1742,56 +1737,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 110|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: COLOR_RED
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 111|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: COLOR_RED
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 109
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 109
|
||||
- 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: 112|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
|
||||
Data: 109|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
|
||||
mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
@@ -1816,16 +1762,16 @@ MonoBehaviour:
|
||||
Data: COLOR_YELLOW
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 113|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 110|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: COLOR_YELLOW
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 109
|
||||
Data: 106
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 109
|
||||
Data: 106
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -1840,7 +1786,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 114|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
|
||||
Data: 111|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
|
||||
mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
@@ -1865,16 +1811,16 @@ MonoBehaviour:
|
||||
Data: COLOR_GREEN
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 115|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 112|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: COLOR_GREEN
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 109
|
||||
Data: 106
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 109
|
||||
Data: 106
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -1889,7 +1835,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 116|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
|
||||
Data: 113|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
|
||||
mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
|
||||
@@ -39,7 +39,6 @@ public class GameManagerRound2 : GameManagerBase
|
||||
|
||||
[UdonSynced] private int _StageIndex = 0;
|
||||
[UdonSynced] private int _CurrentPlayerCounter = 0;
|
||||
[UdonSynced] private string[] _Players = new string[2];
|
||||
[UdonSynced] private bool _RoundIsOver = false;
|
||||
|
||||
private CameraControllerRound2 _CameraControllerRound2 = null;
|
||||
@@ -111,7 +110,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
{
|
||||
_PlayingJailCall = false;
|
||||
|
||||
_JailPhone.Activate = false;
|
||||
_JailPhone.Activate(false);
|
||||
_JailChain.Show = false;
|
||||
|
||||
foreach (ArrivalDisplay Display in _ArrivalDisplays)
|
||||
@@ -234,16 +233,11 @@ public class GameManagerRound2 : GameManagerBase
|
||||
_CurrentPlayerCounter = 0;
|
||||
_RoundIsOver = false;
|
||||
|
||||
for (int i = 0; i < _PlayerPodiums.Length && i < _Players.Length; i++)
|
||||
{
|
||||
_Players[i] = _PlayerPodiums[i].GetPlayer();
|
||||
}
|
||||
|
||||
if (Networking.LocalPlayer == _CaseManager.GetHostOwner())
|
||||
{
|
||||
HostCardRecoverTheLootInterface RecoverTheLootInterface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
RecoverTheLootInterface.SetComment(_Players[_CurrentPlayerCounter % _Players.Length] + ", you're up first.", COLOR_STANDARD);
|
||||
RecoverTheLootInterface.SetComment(_PlayerPodiums[_CurrentPlayerCounter % _PlayerPodiums.Length].GetPlayer() + ", you're up first.", COLOR_STANDARD);
|
||||
RecoverTheLootInterface.SetLootButton(_LocationBoard.LootLocation);
|
||||
RecoverTheLootInterface.SetWarrantButton(_LocationBoard.WarrantLocation);
|
||||
RecoverTheLootInterface.SetCrookButton(_LocationBoard.CrookLocation);
|
||||
@@ -361,9 +355,13 @@ public class GameManagerRound2 : GameManagerBase
|
||||
if (Networking.LocalPlayer != _CaseManager.GetHostOwner()) return;
|
||||
|
||||
_RoundIsOver = true;
|
||||
int WinningPlayerNumber = _CurrentPlayerCounter % _Players.Length;
|
||||
int WinningPlayerNumber = _CurrentPlayerCounter % _PlayerPodiums.Length;
|
||||
string[] Winner = new string[1];
|
||||
Winner[0] = _Players[WinningPlayerNumber];
|
||||
Winner[0] = _PlayerPodiums[WinningPlayerNumber].GetPlayer();
|
||||
if (Winner[0] == "")
|
||||
{
|
||||
Winner[0] = _CaseManager.GetHostOwner().displayName;
|
||||
}
|
||||
_CaseManager.SetCurrentWinningPlayers(Winner);
|
||||
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
@@ -394,7 +392,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
[NetworkCallable]
|
||||
public void YoureWinnerConfettiPlayer()
|
||||
{
|
||||
_PlayerConfettiCannons[_CurrentPlayerCounter % _Players.Length].Play();
|
||||
_PlayerConfettiCannons[_CurrentPlayerCounter % _PlayerConfettiCannons.Length].Play();
|
||||
}
|
||||
|
||||
|
||||
@@ -422,7 +420,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
BetweenRoundsInterface.HeaderUI.text = "Phone Call: " + _CaseManager.GetCrookName();
|
||||
BetweenRoundsInterface.CommentUI.text = "- You and I are going to " + _CaseManager.ContinentToString(_CaseManager.GetFinalRoundContinent());
|
||||
|
||||
_JailPhone.Activate = true;
|
||||
_JailPhone.Activate(true);
|
||||
|
||||
_CameraControllerRound2.DeactivateHostWinnerCameraTrigger();
|
||||
|
||||
@@ -456,7 +454,7 @@ public class GameManagerRound2 : GameManagerBase
|
||||
{
|
||||
HostCardRecoverTheLootInterface Interface =
|
||||
(HostCardRecoverTheLootInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLoot);
|
||||
Interface.SetComment(_Players[_CurrentPlayerCounter % _Players.Length] + ", your turn.", COLOR_STANDARD);
|
||||
Interface.SetComment(_PlayerPodiums[_CurrentPlayerCounter % _PlayerPodiums.Length] + ", your turn.", COLOR_STANDARD);
|
||||
SendCustomEventDelayedSeconds(nameof(ActivateAllPanelButtons_DelayFunction), 0.5f);
|
||||
}
|
||||
|
||||
@@ -592,6 +590,15 @@ public class GameManagerRound2 : GameManagerBase
|
||||
_CameraControllerRound2.SwitchToHostAndWinnerCamera();
|
||||
}
|
||||
|
||||
[NetworkCallable]
|
||||
public void FollowPlayerHoldingPhone(string PlayerToFollow)
|
||||
{
|
||||
if (_CaseManager.GetCurrentWinningPlayers()[0] == "")
|
||||
{
|
||||
_CameraControllerRound2.WinningPlayerCamera_FollowPlayers(new string[1] { PlayerToFollow });
|
||||
}
|
||||
}
|
||||
|
||||
[NetworkCallable]
|
||||
public void PlayJailCall()
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 4
|
||||
Data: 5
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
@@ -116,52 +116,46 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _Activate
|
||||
Data: _ObjectSync
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 7|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Activate
|
||||
Data: _ObjectSync
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 8|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean, mscorlib
|
||||
Data: MMMaellon.LightSync.LightSync, com.mmmaellon.lightsync
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 8
|
||||
Data: 4
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 3
|
||||
Data: 1
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 9|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 2
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 10|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 11|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
|
||||
Data: 10|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -182,19 +176,25 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _CallHasBeenPlayed
|
||||
Data: _Active
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 12|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _CallHasBeenPlayed
|
||||
Data: _Active
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 8
|
||||
Entry: 7
|
||||
Data: 12|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 8
|
||||
Data: 12
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -236,25 +236,73 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _ObjectSync
|
||||
Data: _CallHasBeenPlayed
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ObjectSync
|
||||
Data: _CallHasBeenPlayed
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 12
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 12
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: 16|System.RuntimeType, mscorlib
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: MMMaellon.LightSync.LightSync, com.mmmaellon.lightsync
|
||||
Entry: 3
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 16|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 17|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: _Active_Cached
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 18|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Active_Cached
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 12
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 4
|
||||
Data: 12
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -269,7 +317,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 17|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 19|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
using MMMaellon.LightSync;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Components;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon.Common;
|
||||
using VRC.Udon.Common.Interfaces;
|
||||
|
||||
|
||||
@@ -11,11 +11,12 @@ using VRC.Udon.Common.Interfaces;
|
||||
public class JailPhone : UdonSharpBehaviour
|
||||
{
|
||||
[SerializeField] private GameManagerRound2 _GameManager;
|
||||
[SerializeField] private LightSync _ObjectSync;
|
||||
|
||||
[UdonSynced, FieldChangeCallback(nameof(Activate))] private bool _Activate = false;
|
||||
[UdonSynced] private bool _Active = false;
|
||||
[UdonSynced] private bool _CallHasBeenPlayed = false;
|
||||
|
||||
private LightSync _ObjectSync;
|
||||
private bool _Active_Cached = false;
|
||||
|
||||
|
||||
void Start()
|
||||
@@ -23,21 +24,17 @@ public class JailPhone : UdonSharpBehaviour
|
||||
_ObjectSync = GetComponent<LightSync>();
|
||||
}
|
||||
|
||||
public void Initialise()
|
||||
public override void OnDeserialization(DeserializationResult Result)
|
||||
{
|
||||
_ObjectSync.TeleportToLocalSpace(Vector3.zero, Quaternion.identity, false);
|
||||
|
||||
Activate = false;
|
||||
_CallHasBeenPlayed = false;
|
||||
|
||||
RequestSerialization();
|
||||
_Activate_Synced();
|
||||
base.OnDeserialization(Result);
|
||||
}
|
||||
|
||||
public override void OnPickup()
|
||||
{
|
||||
if (Networking.LocalPlayer != _GameManager.GetHostOwner())
|
||||
{
|
||||
PlayJailCall();
|
||||
Networking.SetOwner(Networking.LocalPlayer, gameObject);
|
||||
}
|
||||
base.OnPickup();
|
||||
}
|
||||
@@ -51,10 +48,51 @@ public class JailPhone : UdonSharpBehaviour
|
||||
base.OnPickupUseDown();
|
||||
}
|
||||
|
||||
public override void OnOwnershipTransferred(VRCPlayerApi Player)
|
||||
{
|
||||
_GameManager.SendCustomNetworkEvent(NetworkEventTarget.Owner, "FollowPlayerHoldingPhone", Player.displayName);
|
||||
PlayJailCall();
|
||||
base.OnOwnershipTransferred(Player);
|
||||
}
|
||||
|
||||
|
||||
public void Initialise()
|
||||
{
|
||||
Activate(false);
|
||||
_CallHasBeenPlayed = false;
|
||||
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
public void Activate(bool Active)
|
||||
{
|
||||
_Active = Active;
|
||||
_Activate_Synced();
|
||||
_ObjectSync.pickup.pickupable = _Active;
|
||||
RequestSerialization();
|
||||
}
|
||||
private void _Activate_Synced()
|
||||
{
|
||||
if (_Active != _Active_Cached)
|
||||
{
|
||||
if (_Active)
|
||||
{
|
||||
_GameManager.PhoneRing();
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.localPosition = Vector3.zero;
|
||||
transform.localRotation = Quaternion.identity;
|
||||
}
|
||||
}
|
||||
|
||||
_Active_Cached = _Active;
|
||||
}
|
||||
|
||||
|
||||
private void PlayJailCall()
|
||||
{
|
||||
if (Activate && !_CallHasBeenPlayed)
|
||||
if (_Active && !_CallHasBeenPlayed)
|
||||
{
|
||||
SendCustomEventDelayedSeconds(nameof(PlayJailCall_Delayed), 0.75f);
|
||||
_CallHasBeenPlayed = true;
|
||||
@@ -65,21 +103,4 @@ public class JailPhone : UdonSharpBehaviour
|
||||
{
|
||||
_GameManager.SendCustomNetworkEvent(NetworkEventTarget.Owner, "PlayJailCall");
|
||||
}
|
||||
|
||||
|
||||
public bool Activate
|
||||
{
|
||||
set
|
||||
{
|
||||
_Activate = value;
|
||||
if (_Activate)
|
||||
{
|
||||
_GameManager.PhoneRing();
|
||||
}
|
||||
_ObjectSync.pickup.pickupable = _Activate;
|
||||
Debug.Log("[JailPhone] Pickupable status is now " + (_ObjectSync.pickup.pickupable ? "true" : "false"));
|
||||
RequestSerialization();
|
||||
}
|
||||
get => _Activate;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class PlayerPodium : UdonSharpBehaviour
|
||||
[SerializeField] private GameManagerRound1 _GameManager;
|
||||
[SerializeField] private GameObject _TeleportButton;
|
||||
|
||||
[UdonSynced, FieldChangeCallback(nameof(PlayerName))] private string _PlayerName = "Player";
|
||||
[UdonSynced, FieldChangeCallback(nameof(PlayerName))] private string _PlayerName = "";
|
||||
[UdonSynced] private int _PlayerID = -1;
|
||||
[UdonSynced, FieldChangeCallback(nameof(PlayerScore))] private int _PlayerScore = 50;
|
||||
[UdonSynced, FieldChangeCallback(nameof(ShowScoreCard))] private bool _ShowScoreCard = false;
|
||||
@@ -121,7 +121,7 @@ public class PlayerPodium : UdonSharpBehaviour
|
||||
[NetworkCallable]
|
||||
public void ResetOwner()
|
||||
{
|
||||
PlayerName = "Player " + PlayerNumber;
|
||||
PlayerName = "";
|
||||
_PlayerID = -1;
|
||||
|
||||
_Pedestal.EnableStandInteractLocally(false);
|
||||
@@ -322,7 +322,14 @@ public class PlayerPodium : UdonSharpBehaviour
|
||||
set
|
||||
{
|
||||
_PlayerName = value;
|
||||
_NameplateUI.text = value;
|
||||
if (_PlayerName == "")
|
||||
{
|
||||
_NameplateUI.text = "Player " + PlayerNumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
_NameplateUI.text = value;
|
||||
}
|
||||
}
|
||||
get => _PlayerName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user