Esempio n. 1
0
 public void ResearchClicked(IResearchItem clicked)
 {
     desciption.text          = clicked.details;
     price.text               = "" + clicked.Cost;
     clickedResearchName.text = clicked.researchName;
     buyButton.onClick.RemoveAllListeners();
     buyButton.onClick.AddListener(clicked.Buy);
     buyButton.interactable = clicked.IsBuyable() && !clicked.Bought;
 }
Esempio n. 2
0
 private void RecalculateAvailability()
 {
     if (researchItem.Bought)
     {
         button.GetComponent <Image>().color = manager.boughtColor;
     }
     else
     {
         if (researchItem.IsBuyable())
         {
             button.GetComponent <Image>().color = manager.activeColor;
         }
         else
         {
             button.GetComponent <Image>().color = manager.unactiveColor;
         }
     }
 }