public void CheckUI(TileEvent te) { tileEvent = te; popupUI.SetActive(true); popupUI.transform.GetChild(0).transform.GetChild(0).GetComponent <Text> ().text = te.GetNameE(); popupUI.transform.GetChild(1).transform.GetChild(0).GetComponent <Text> ().text = te.GetDescription(); if (tileEvent.GetTType().Equals("Void") || tileEvent.GetTType().Equals("Checked")) { popupUI.transform.GetChild(2).gameObject.SetActive(false); } else { popupUI.transform.GetChild(2).gameObject.SetActive(true); } }
public void AcceptPopup() { if (tileEvent.GetTType().Equals("Power")) { gameBoard.AddNewPower(tileEvent.GetPower()); popupUI.SetActive(false); } else if (tileEvent.GetTType().Equals("Item")) { gameBoard.AddNewItem(tileEvent.GetItem()); popupUI.SetActive(false); } else { tileEvent.GetHap().ActivateHap(player); popupUI.transform.GetChild(1).transform.GetChild(0).GetComponent <Text> ().text = tileEvent.GetHap().GetDescription(); popupUI.transform.GetChild(2).gameObject.SetActive(false); } tileEvent.ClearEvent(); }