private void Start()
 {
     if (herbsImg != null && chemsImg != null && plasticImg != null)
     {
         herbsImg.sprite   = Resources.Load <Sprite>("Icons/herbs");
         chemsImg.sprite   = Resources.Load <Sprite>("Icons/chemistry");
         plasticImg.sprite = Resources.Load <Sprite>("Icons/plastic");
     }
     if (rpImg != null)
     {
         rpImg.sprite = Resources.Load <Sprite>("Icons/researchPoint");
     }
     if (moneyImg != null)
     {
         moneyImg.sprite        = Resources.Load <Sprite>("Icons/money");
         interpol.originalColor = money.color;
     }
     if (autoGenerate)
     {
         craftHolder  = GetComponentInChildren <CraftHolder>();
         recipeHolder = GetComponentInChildren <RecipeHolder>();
         if (craftHolder != null)
         {
             SetPanel(craftHolder.Talent.characteristics);
         }
         else if (recipeHolder != null)
         {
             SetPanel(recipeHolder.recipe.characteristics);
         }
     }
     else
     {
         SetPanel();
     }
 }
 public void SetPanel(Talent talent, CraftHolder holder)
 {
     if (talent == null)
     {
         return;
     }
     ChangeView(false);
     SetMainInformation(talent);
 }
Example #3
0
 public DescriptionPanel GetDescriptionPanel(CraftHolder holder)
 {
     if (dPanels[0].gameObject.activeInHierarchy)
     {
         return(dPanels[0]);
     }
     else
     {
         return(null);
     }
 }
Example #4
0
 private void Start()
 {
     if (autoGenerate)
     {
         craftHolder  = GetComponentInChildren <CraftHolder>();
         recipeHolder = GetComponentInChildren <RecipeHolder>();
         if (craftHolder != null)
         {
             SetPanel(craftHolder.Talent.characteristics);
         }
         else if (recipeHolder != null)
         {
             SetPanel(recipeHolder.recipe.characteristics);
         }
     }
     else
     {
         SetPanel();
     }
 }
Example #5
0
 public void OnSelectHolder(CraftHolder holder) // on click at main talent holders
 {
     crafter.view.holderSelected = holder;
 }