- Player teleport buttons disappear when the linked podium has an owner. - Fixed podium interaction setting the wrong owner. - Buzzers get GameManager from podium, rather than directly using the podium's.
33 lines
644 B
C#
33 lines
644 B
C#
|
|
using UdonSharp;
|
|
using UnityEngine;
|
|
using VRC.SDK3.UdonNetworkCalling;
|
|
using VRC.Udon.Common.Interfaces;
|
|
using VRC.SDKBase;
|
|
using VRC.Udon;
|
|
|
|
public class Buzzer : UdonSharpBehaviour
|
|
{
|
|
public PlayerPodium Podium;
|
|
|
|
private GameManagerRound1 _GameManager;
|
|
|
|
|
|
public void SetGameManager(GameManagerRound1 Manager)
|
|
{
|
|
_GameManager = Manager;
|
|
}
|
|
|
|
public override void OnPickupUseDown()
|
|
{
|
|
VRCPlayerApi LocalPlayer = Networking.LocalPlayer;
|
|
if (Podium.GetPlayerID() == LocalPlayer.playerId)
|
|
{
|
|
_GameManager.SendCustomNetworkEvent(NetworkEventTarget.All,
|
|
"PlayerBuzzedIn", Podium.PlayerNumber);
|
|
}
|
|
|
|
base.OnPickupUseDown();
|
|
}
|
|
}
|