public void OnOKButtonInsideSettingClicked() { ExitGames.Client.Photon.Hashtable finalteamType = new ExitGames.Client.Photon.Hashtable() { { "teamType", teamSelectionNumber } }; PhotonNetwork.LocalPlayer.SetCustomProperties(finalteamType); leftTeamButton.SetActive(false); //leftcolorbutton on rightTeamButton.SetActive(false); //right color button on TeamColors.SetActive(false); InsideSettingOKButton.SetActive(false); if (PhotonNetwork.LocalPlayer.IsMasterClient) //start game button off { StartGameButton.SetActive(true); TimeLeftButton.SetActive(false); TimeRightButton.SetActive(false); TotalTime.SetActive(false); } PlayerReadyButton.gameObject.SetActive(true); // ready button of SettingButton.SetActive(true); // setting button itself off }
public void OnSettingButtonClicked() { ExitGames.Client.Photon.Hashtable intialteamType = new ExitGames.Client.Photon.Hashtable() { { "teamType", teamSelectionNumber } }; PhotonNetwork.LocalPlayer.SetCustomProperties(intialteamType); leftTeamButton.SetActive(true); //leftcolorbutton on rightTeamButton.SetActive(true); //right color button on TeamColors.SetActive(true); InsideSettingOKButton.SetActive(true); if (PhotonNetwork.LocalPlayer.IsMasterClient) //start game button off { StartGameButton.SetActive(false); TimeLeftButton.SetActive(true); TimeRightButton.SetActive(true); TotalTime.SetActive(true); object gameTime; if (PhotonNetwork.CurrentRoom.CustomProperties.TryGetValue("gt", out gameTime)) { TotalTime.GetComponent <TextMeshProUGUI>().text = gameTime.ToString() + " MIN"; } } PlayerReadyButton.gameObject.SetActive(false); // ready button of SettingButton.SetActive(false); // setting button itself off }