Exemplo n.º 1
0
    // Start is called before the first frame update

    public void Init(Skill skill, SkillUpgrade upgrade, int currentUpgradeAmount)
    {
        icon.Initialize(skill.Icon.IconName);
        Skill                = skill;
        Upgrade              = upgrade;
        SkillName.text       = skill.Name;
        UpgradeDesc.text     = upgrade.Description;
        CurrentUpgrades.text = "Current Upgrades: " + currentUpgradeAmount + "/" + upgrade.MaxUpgrades;
    }
Exemplo n.º 2
0
 public void Init(Skill skill, int index)
 {
     slot  = index;
     Skill = skill;
     if (Skill != Skill.Default)
     {
         icon.Initialize(skill.Icon.IconName);
         Skill          = skill;
         SkillName.text = skill.Name;
         SkillDesc.text = skill.Icon.Description;
     }
     else
     {
         SkillName.text = "";
         SkillDesc.text = "Empty Skill Slot";
     }
 }
Exemplo n.º 3
0
    /// <summary>
    /// initializes icon with a skill
    /// </summary>
    /// <param name="slot"></param>
    /// <param name="iconName"></param>
    /// <param name="Cost"></param>
    public void InitIcon(int slot, string iconName, float Cost, int cooldown)
    {
        {
            switch (slot)
            {
            case 1:
                icon1.Initialize(iconName, Cost, cooldown);
                break;

            case 2:
                icon2.Initialize(iconName, Cost, cooldown);
                break;

            case 3:
                icon3.Initialize(iconName, Cost, cooldown);
                break;

            case 4:
                icon4.Initialize(iconName, Cost, cooldown);
                break;
            }
        }
    }
Exemplo n.º 4
0
 void DisplaySkill(Skill s)
 {
     icon.Initialize(s.Icon.IconName);
     SkillUnlockedName.text        = s.Name;
     SkillUnlockedDescription.text = s.Icon.Description;
 }