void RPC_ShowCCDialougPanel(string title, string contents) { CCDialoug.SetActive(true); //CCDialoug.transform.GetChild(0).gameObject.SetActive(false); GameObject.Find("CardTitleText").GetComponent <Text>().text = title; GameObject.Find("ContentsText").GetComponent <Text>().text = contents; //Take necesaary step here or before calling this RPC PropertyOwnership.Instance.AddReward(5); }
void Awake() { CCDialoug.SetActive(false); PropertyCardPanel.SetActive(false); Dialoge.SetActive(false); TrainStationCardPanel.SetActive(false); UtilityPanel.SetActive(false); if (!PhotonNetwork.IsConnected) { SceneManager.LoadScene(0); return; } }
void RPC_ClosePanel() { if (PropertyCardPanel.activeInHierarchy) { PropertyCardPanel.SetActive(false); } else if (CCDialoug.activeInHierarchy) { CCDialoug.transform.GetChild(0).gameObject.SetActive(false); CCDialoug.SetActive(false); } else if (Dialoge.activeInHierarchy) { Dialoge.SetActive(false); } else if (TrainStationCardPanel.activeInHierarchy) { TrainStationCardPanel.SetActive(false); } else if (UtilityPanel.activeInHierarchy) { UtilityPanel.SetActive(false); } }