示例#1
0
 void Awake()
 {
     for (int i = 0; i < 4; ++i)
     {
         RoomPlayerItemView pView = GameObject.Instantiate <RoomPlayerItemView>(playerItemViewPrefab, playerGroup, false);
         pView.gameObject.SetActive(false);
         _playerItemViewList.Add(pView);
         _playerIsReady.Add(false);
     }
 }
示例#2
0
    void Awake()
    {
        for (int i = 0; i < PlayerGroup.kMaxPlayerCount; ++i)
        {
            RoomPlayerItemView pView = GameObject.Instantiate <RoomPlayerItemView>(playerItemViewPrefab, playerGroup, false);
            pView.gameObject.SetActive(false);
            _playerItemViewList.Add(pView);
            _playerIsReady.Add(false);
        }

        OnIntroTransitionFinished();
    }
示例#3
0
    public void SetPlayer(int index, PhotonPlayer player)
    {
        Assert.IsTrue(index < _playerItemViewList.Count);

        RoomPlayerItemView pView = _playerItemViewList[index];

        if (player != null)
        {
            pView.playerId = player.ID;
            pView.gameObject.SetActive(true);
            pView.playerName.text = player.NickName;
            pView.checkmark.gameObject.SetActive(false);
        }
        else
        {
            pView.gameObject.SetActive(false);
        }
    }