Ejemplo n.º 1
0
 public void UpdateVisual()
 {
     if (playerSkills.IsSkillUnlocked(skillType))
     {
         image.material           = null;
         backgroundImage.material = null;
         backgroundImage.sprite   = unlockedBackgroundImage;
     }
     else
     {
         if (playerSkills.CanUnlock(skillType))
         {
             image.material           = skillUnlockableMaterial;
             backgroundImage.material = skillUnlockableMaterial;
         }
         else
         {
             image.material           = skillLockedMaterial;
             backgroundImage.material = skillUnlockableMaterial;
         }
     }
 }
Ejemplo n.º 2
0
 private void UpdateVisuals()
 {
     foreach (Button button in skillButtons)
     {
         BaseSkill skill = playerSkills.GetSkillByName(button.name);
         if (playerSkills.IsSkillUnlocked(skill))
         {
             button.gameObject.GetComponentInChildren <Image>().color = Color.yellow;
         }
         else
         {
             if (playerSkills.CanUnlock(skill))
             {
                 button.gameObject.GetComponentInChildren <Image>().color = Color.green;
             }
             else
             {
                 button.gameObject.GetComponentInChildren <Image>().color = Color.black;
             }
         }
     }
 }
Ejemplo n.º 3
0
 public void UpdateVisual()
 {
     if (playerSkills.IsSkillUnlocked(skillType))
     {
         image.material           = null;
         backgroundImage.material = null;
     }
     else
     {
         if (playerSkills.CanUnlock(skillType))
         {
             image.material        = skillUnlockableMaterial;
             backgroundImage.color = UtilsClass.GetColorFromString("4B677D");
             transform.GetComponent <Button_UI>().enabled = true;
         }
         else
         {
             image.material        = skillLockedMaterial;
             backgroundImage.color = new Color(.3f, .3f, .3f);
             transform.GetComponent <Button_UI>().enabled = false;
         }
     }
 }