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); } }
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(); }
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); } }