//Pun監視つける public void PlayerList()//Awakeから呼び出し { int playercount = PhotonNetwork.CurrentRoom.PlayerCount; for (int i = 0; i < playercount; i++) { if (PhotonNetwork.CurrentRoom.CustomProperties[i.ToString()] is Player customPlayer) { playerList[i].SetActive(true); playerNameText[i].text = customPlayer.NickName; if (customPlayer.CustomProperties["color"] is string customColor) { playerNumColor[i].color = colorList.NameListColor(customColor); } } } /*for (int i=playercount; i<maxPlayer;i++) * { * playerList[i].SetActive(false); * }*/ if (pieceNumText[0].text == 0.ToString())//大丈夫?? { if (PhotonNetwork.CurrentRoom.CustomProperties["Piece"] is int pieceNum) { for (int i = 0; i < gamemanager.startPlayerCount; i++) { pieceNumText[i].text = pieceNum.ToString(); } } if (PhotonNetwork.CurrentRoom.CustomProperties["Turn"] is int turnLimitNum) { for (int i = 0; i < gamemanager.startPlayerCount; i++) { turnLimitText[i].text = turnLimitNum.ToString(); } } } }