PhotonPlayer.Find C# (CSharp) Method

Find() public static method

Try to get a specific player by id.
public static Find ( int ID ) : PhotonPlayer,
ID int ActorID
return PhotonPlayer,
    public static PhotonPlayer Find(int ID)
    {
        foreach (PhotonPlayer player in PhotonNetwork.playerList)
        {
            if (player.ID == ID)
                return player;
        }
        return null;
    }

Usage Example

Esempio n. 1
0
        private static IEnumerator CheckEndless(int id, float time)
        {
            yield return(new WaitForSeconds(time));

            PhotonPlayer player = PhotonPlayer.Find(id);

            if (player != null && player.Dead && !player.IsTitan)
            {
                FengGameManagerMKII.FGM.BasePV.RPC("respawnHeroInNewRound", player);
            }
        }
All Usage Examples Of PhotonPlayer::Find