Пример #1
0
    public void playerJoinedRoom(PhotonPlayer unPhotonPlayer)
    {
        if (unPhotonPlayer == null)
        {
            return;
        }

        playerLeftRoom(unPhotonPlayer);

        GameObject playerListingObj = Instantiate(playerListingPrefab);

        playerListingObj.transform.SetParent(transform, false);

        PlayerListing playerListing = playerListingObj.GetComponent <PlayerListing>();

        playerListing.applyPhotonPlayer(unPhotonPlayer);

        listeDeJoueur.Add(playerListing);
    }