public void EnableSkills()
    {
        // If the player has the skill already, then show it as enabled
        if (m_GodHandler && skill && skill.EnableSkill(m_GodHandler))
        {
            TurnOnSkillIcon();
        }

        // If the player doesn't have the skill, but can get it, make it interactable
        else if (m_GodHandler && skill && skill.CheckSkills(m_GodHandler))
        {
            this.GetComponent <Button>().interactable = true;
            this.transform.Find("IconParent").Find("Disabled").gameObject.SetActive(false);
        }

        else if (m_GodHandler && skill && !skill.CheckSkills(m_GodHandler))
        {
            TurnOffSkillIcon();
        }
    }
Exemple #2
0
 public void EnableSkills()
 {
     if (m_PlayerHandler && skill && skill.EnableSkill(m_PlayerHandler))
     {
         TurnOnSkillIcon();
     }
     else if (m_PlayerHandler && skill & skill.CheckSkills(m_PlayerHandler))
     {
         this.GetComponent <Button>().interactable = true;
         this.transform.Find("IconParent").Find("Disabled").gameObject.SetActive(false);
     }
     else
     {
         TurnOffSkillIcon();
     }
 }