public void Action() { if (!objectPool || !RandomJudgement()) { return; } Networking.SetOwner(Networking.LocalPlayer, objectPool.gameObject); objectPool.Return(gameObject); }
public override void OnPlayerLeft(VRCPlayerApi player) { if (Networking.IsMaster) { foreach (GameObject o in _objectPool.Pool) { if (o.activeSelf && Networking.IsOwner(player, o)) { _objectPool.Return(o); } } } }
public void Action() { if (!objectPool || !RandomJudgement()) { return; } Networking.SetOwner(Networking.LocalPlayer, objectPool.gameObject); foreach (GameObject obj in objectPool.Pool) { objectPool.Return(obj); } }
public void OnTriggerEnter(Collider other) { if (!Utilities.IsValid(other)) //player stations will break this. { Debug.Log("trigger had something bad enter"); return; } VRCPickup temppickup = (VRCPickup)other.GetComponent(typeof(VRCPickup)); if (temppickup) { temppickup.Drop(); } if (Networking.LocalPlayer.IsOwner(other.gameObject)) { Networking.SetOwner(Networking.LocalPlayer, gameObject); pool.Return(other.gameObject); } }