Exemplo n.º 1
0
 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();
 }