public virtual void OnPlayerLeft(VRC.SDKBase.VRCPlayerApi player) //getting the player array on player leave still has the leaving player so you must remove it manually.
    {
        for (int i = 0; i < userList.Length; i++)
        {
            if (userList[i] == player)
            {
                userList[i] = null;
                break;
            }
        }
        RefreshUsers();

        if (numberDisplay)
        {
            /*
             * int usernumber = 0;
             * foreach (VRCPlayerApi user in userList)
             * {
             *  if(user != null)
             *  {
             *      usernumber += 1;
             *  }
             * }
             *
             * numberDisplay.text = usernumber.ToString();
             */
            numberDisplay.text = VRCPlayerApi.GetPlayerCount().ToString();
        }
    }
Exemplo n.º 2
0
 public override void OnStationExited(VRC.SDKBase.VRCPlayerApi player)
 {
     if (seated == player)
     {
         seated = null;
     }
 }
Exemplo n.º 3
0
 public virtual void OnPlayerTriggerEnter(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.isLocal)
     {
         SetMovement();
     }
 }
Exemplo n.º 4
0
 public virtual void OnPlayerTriggerStay(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.isLocal)
     {
         playersetvelocity();
     }
 }
Exemplo n.º 5
0
 public virtual void OnStationExited(VRC.SDKBase.VRCPlayerApi player)
 {
     if (seated == player)
     {
         seated = null;
     }
 }
 public virtual void OnPlayerJoined(VRC.SDKBase.VRCPlayerApi player)
 {
     if (global)
     {
         SetPlayerAudio(player);
     }
 }
Exemplo n.º 7
0
    public void OnPlayerJoined(VRC.SDKBase.VRCPlayerApi player)
    {
        for (int i = 0; i < setcapacity; i++)
        {
            if (playerlist[i] == null)
            {
                playerlist[i] = player;
                break;
            }
            else if (playerlist[i] == player)
            {
                break;
            }
        }

        names = "";

        for (int i = 0; i < setcapacity; i++)
        {
            if (playerlist[i] != null)
            {
                names += (playerlist[i].displayName + "\n");
            }
        }

        usersdisplay.text = names;
    }
 public virtual void OnPlayerTriggerExit(VRC.SDKBase.VRCPlayerApi player)
 {
     if (!global && regionRevertSettings)
     {
         regionRevertSettings.SetPlayerAudio(player);
     }
 }
Exemplo n.º 9
0
 public virtual void OnPlayerTriggerExit(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.isLocal && !clear)
     {
         clear = true;
     }
 }
Exemplo n.º 10
0
 public virtual void OnPlayerTriggerExit(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.isLocal && zoneExitReset)
     {
         zoneExitReset.SetMovement();
     }
 }
 public virtual void OnPlayerTriggerEnter(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.isLocal)
     {
         player.TeleportTo(teleportPoint.position, teleportPoint.rotation, teleportOrientation, lerpOnRemote);
     }
 }
Exemplo n.º 12
0
 public virtual void OnPlayerJoined(VRC.SDKBase.VRCPlayerApi player)
 {
     if (!networked)
     {
         Joined();
     }
 }
Exemplo n.º 13
0
 public virtual void OnPlayerLeft(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.displayName == user)
     {
         vis.SetActive(false);
     }
 }
Exemplo n.º 14
0
 public void OnPlayerJoined(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.displayName == user)
     {
         vis.SetActive(true);
     }
 }
    public virtual void OnPlayerJoined(VRC.SDKBase.VRCPlayerApi player)
    {
        RefreshList();
        RefreshUsers();

        if (numberDisplay)
        {
            numberDisplay.text = VRCPlayerApi.GetPlayerCount().ToString();
        }
    }
Exemplo n.º 16
0
 public virtual void OnPlayerJoined(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.displayName == userName)
     {
         if (player.isLocal || !localOnly)
         {
             udonBehaviour.SendCustomEvent(eventName);
         }
     }
 }
Exemplo n.º 17
0
 public virtual void OnPlayerTriggerEnter(VRC.SDKBase.VRCPlayerApi player)
 {
     if (sendTo)
     {
         if (player.isLocal && clear)
         {
             sendTo.clear = false;
             player.TeleportTo(sendTo.teleporterPoint.position, sendTo.teleporterPoint.rotation, VRC_SceneDescriptor.SpawnOrientation.AlignPlayerWithSpawnPoint, false);
         }
     }
 }
Exemplo n.º 18
0
 public void SnowboardEntered(VRC.SDKBase.VRCPlayerApi player, VRCStation station)
 {
     if (player.isLocal)
     {
         this.station       = station;
         localUser          = player;
         transform.position = StartPosition.position;
         transform.rotation = StartPosition.rotation;
         momentum           = Vector2.zero;
         gravityMomentum    = 0;
     }
 }
Exemplo n.º 19
0
    public virtual void OnStationExited(VRC.SDKBase.VRCPlayerApi player)
    {
        if (seated == player)
        {
            seated = null;
        }

        if (player.isLocal)
        {
            car.ExitedCar();
            exitbutton.SetActive(false);
        }
    }
Exemplo n.º 20
0
    public virtual void OnStationEntered(VRC.SDKBase.VRCPlayerApi player)
    {
        seated = player;

        if (player.isLocal)
        {
            car.EnteredCar();
            exitbutton.SetActive(true);
        }
        else
        {
            car.RemoteEnteredCar();
        }
    }
Exemplo n.º 21
0
 void Start()
 {
     player = Networking.LocalPlayer;
 }
Exemplo n.º 22
0
 override public void OnPlayerTriggerEnter(VRC.SDKBase.VRCPlayerApi player)
 {
     //Debug.Log("Updating color");
     this.GetComponent <SpriteRenderer>().color = onColor;
 }
Exemplo n.º 23
0
 public override void OnStationEntered(VRC.SDKBase.VRCPlayerApi player)
 {
     seated = player;
 }
Exemplo n.º 24
0
 public virtual void OnStationEntered(VRC.SDKBase.VRCPlayerApi player)
 {
     seated = player;
 }
Exemplo n.º 25
0
 public override void OnPlayerJoined(VRC.SDKBase.VRCPlayerApi player)
 {
     count++;
     UIUpdate();
 }
Exemplo n.º 26
0
 public override void OnPlayerLeft(VRC.SDKBase.VRCPlayerApi player)
 {
     count--;
     UIUpdate();
 }
Exemplo n.º 27
0
 public override void OnPlayerLeft(VRC.SDKBase.VRCPlayerApi player)
 {
     UpdatePlayers();
 }
Exemplo n.º 28
0
 public override void OnPlayerTriggerEnter(VRC.SDKBase.VRCPlayerApi player)
 {
     Add(player);
 }
Exemplo n.º 29
0
 public override void OnPlayerTriggerExit(VRC.SDKBase.VRCPlayerApi player)
 {
     Remove(player);
 }
Exemplo n.º 30
0
 public override void OnPlayerLeft(VRC.SDKBase.VRCPlayerApi player)
 {
     Remove(player);
 }