Ownership changes now apply to the filing cabinet and its note dispensers.
This commit is contained in:
parent
92bb182d27
commit
bc56353e25
@ -59,6 +59,15 @@ public class FilingCabinet : UdonSharpBehaviour
|
|||||||
base.OnDeserialization(Result);
|
base.OnDeserialization(Result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnOwnershipTransferred(VRCPlayerApi Player)
|
||||||
|
{
|
||||||
|
foreach (FilingCabinetNoteDispenser NoteDispenser in _NoteDispensers)
|
||||||
|
{
|
||||||
|
Networking.SetOwner(Player, NoteDispenser.gameObject);
|
||||||
|
}
|
||||||
|
base.OnOwnershipTransferred(Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void OpenDrawer1()
|
public void OpenDrawer1()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -165,10 +165,11 @@ public class GameManagerRound3 : GameManagerBase
|
|||||||
|
|
||||||
public void BeginRound()
|
public void BeginRound()
|
||||||
{
|
{
|
||||||
GetCurrentMarker().SendCustomNetworkEvent(NetworkEventTarget.Owner, "Activated", true);
|
_GameStatus = GameStatus.Begin;
|
||||||
|
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
|
|
||||||
|
GetCurrentMarker().SendCustomNetworkEvent(NetworkEventTarget.Owner, "Activated", true);
|
||||||
|
|
||||||
_EndingPlayer.LoadRandomVideo();
|
_EndingPlayer.LoadRandomVideo();
|
||||||
|
|
||||||
StartTimer();
|
StartTimer();
|
||||||
@ -179,7 +180,6 @@ public class GameManagerRound3 : GameManagerBase
|
|||||||
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
|
_AudioManager.SendCustomNetworkEvent(NetworkEventTarget.All,
|
||||||
"PlayMusicLoop", MusicEventType.CarmenChaseMusic);
|
"PlayMusicLoop", MusicEventType.CarmenChaseMusic);
|
||||||
|
|
||||||
_GameStatus = GameStatus.Begin;
|
|
||||||
_Timer = TIMER_LENGTH;
|
_Timer = TIMER_LENGTH;
|
||||||
SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(BeginTimerTick));
|
SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(BeginTimerTick));
|
||||||
|
|
||||||
@ -431,6 +431,8 @@ public class GameManagerRound3 : GameManagerBase
|
|||||||
|
|
||||||
|
|
||||||
private void UpdateInterface()
|
private void UpdateInterface()
|
||||||
|
{
|
||||||
|
if (_GameStatus == GameStatus.Begin)
|
||||||
{
|
{
|
||||||
HostCardCaptureCarmenInterface CaptureCarmenInterface =
|
HostCardCaptureCarmenInterface CaptureCarmenInterface =
|
||||||
(HostCardCaptureCarmenInterface)GetHostCardInterface(RoundSegmentType.CaptureCarmen);
|
(HostCardCaptureCarmenInterface)GetHostCardInterface(RoundSegmentType.CaptureCarmen);
|
||||||
@ -452,13 +454,14 @@ public class GameManagerRound3 : GameManagerBase
|
|||||||
|
|
||||||
CaptureCarmenInterface.CommentUI.text = City + ", " + Region + Country;
|
CaptureCarmenInterface.CommentUI.text = City + ", " + Region + Country;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private string GetRound3PlayerName()
|
private string GetRound3PlayerName()
|
||||||
{
|
{
|
||||||
string[] CurrentWinner = _CaseManager.GetCurrentWinningPlayers();
|
string[] CurrentWinner = _CaseManager.GetCurrentWinningPlayers();
|
||||||
if (CurrentWinner == null || CurrentWinner.Length != 1)
|
if (CurrentWinner == null || CurrentWinner.Length != 1)
|
||||||
{
|
{
|
||||||
return "The player";
|
return Networking.GetOwner(GetCurrentMarker().gameObject).displayName;
|
||||||
}
|
}
|
||||||
return CurrentWinner[0];
|
return CurrentWinner[0];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user