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();
        }
    }
Ejemplo n.º 2
0
 public override void OnStationExited(VRC.SDKBase.VRCPlayerApi player)
 {
     if (seated == player)
     {
         seated = null;
     }
 }
Ejemplo n.º 3
0
 public virtual void OnPlayerTriggerEnter(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.isLocal)
     {
         SetMovement();
     }
 }
Ejemplo n.º 4
0
 public virtual void OnPlayerTriggerStay(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.isLocal)
     {
         playersetvelocity();
     }
 }
Ejemplo 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);
     }
 }
Ejemplo 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);
     }
 }
Ejemplo n.º 9
0
 public virtual void OnPlayerTriggerExit(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.isLocal && !clear)
     {
         clear = true;
     }
 }
Ejemplo 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);
     }
 }
Ejemplo n.º 12
0
 public virtual void OnPlayerJoined(VRC.SDKBase.VRCPlayerApi player)
 {
     if (!networked)
     {
         Joined();
     }
 }
Ejemplo n.º 13
0
 public virtual void OnPlayerLeft(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.displayName == user)
     {
         vis.SetActive(false);
     }
 }
Ejemplo 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();
        }
    }
Ejemplo n.º 16
0
 public virtual void OnPlayerJoined(VRC.SDKBase.VRCPlayerApi player)
 {
     if (player.displayName == userName)
     {
         if (player.isLocal || !localOnly)
         {
             udonBehaviour.SendCustomEvent(eventName);
         }
     }
 }
Ejemplo 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);
         }
     }
 }
Ejemplo 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;
     }
 }
Ejemplo n.º 19
0
    public virtual void OnStationExited(VRC.SDKBase.VRCPlayerApi player)
    {
        if (seated == player)
        {
            seated = null;
        }

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

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