Beispiel #1
0
    public void Initialize(LeaderSkill skill)
    {
        _skill = skill;

        tooltip.Initialize(skill);
        icon.sprite = skill.LoadSprite();
    }
Beispiel #2
0
    public void Initialize(Skill skill, Hero hero = null)
    {
        _skill = skill;
        _hero  = hero;

        if (hero != null)
        {
            tooltip.Initialize(skill, hero);
        }
        else
        {
            tooltip.Initialize(skill);
        }

        if (SkillLevel != null)
        {
            SkillLevel.text = hero.GetSkillLevel(skill).ToString();
        }
        icon.sprite = skill.LoadSprite();
    }
    void Start()
    {
        if (Instanse.gameObject != gameObject)
        {
            return;
        }

        toolTip.TipDelay = 0.05f;
        toolTip.Initialize();
        skillToolTip.TipDelay = 0.1f;
        skillToolTip.Initialize();
    }
Beispiel #4
0
    public void Initialize(Hero hero, TapBattleInterface tapBattleRef, TapBattleController controller, TapCharacterHandler handler)
    {
        this.hero         = hero;
        this.tapBattleRef = tapBattleRef;
        this.controller   = controller;
        this.fctInterface = controller.FCTInterface;
        this.handler      = handler;

        portrait.sprite  = hero.LoadPortraitSprite();
        skillIcon.sprite = hero.tapSkill.sprite;// Resources.Load<Sprite>("Hero/" + hero.data.Identity.ToLower() + "/portrait");

        switch (hero.tapSkill.element)
        {
        case ElementalTypes.Fire:
            Element.sprite           = Resources.Load <Sprite>("Items/None/element_fire");
            ElementBackground.sprite = Element.sprite;
            break;

        case ElementalTypes.Water:
            Element.sprite           = Resources.Load <Sprite>("Items/None/element_water");
            ElementBackground.sprite = Element.sprite;
            break;

        case ElementalTypes.Nature:
            Element.sprite           = Resources.Load <Sprite>("Items/None/element_nature");
            ElementBackground.sprite = Element.sprite;
            break;

        case ElementalTypes.Light:
            Element.sprite           = Resources.Load <Sprite>("Items/None/element_light");
            ElementBackground.sprite = Element.sprite;
            break;

        case ElementalTypes.Dark:
            Element.sprite           = Resources.Load <Sprite>("Items/None/element_dark");
            ElementBackground.sprite = Element.sprite;
            break;

        default:
            Element.gameObject.SetActive(false);
            ElementBackground.gameObject.SetActive(false);
            break;
        }

        tooltip.Initialize(hero.tapSkill);
        cooldownTotal = hero.tapSkill.cooldown * 60f;// 90f - (60f * ((float) hero.GetPrimaryStat(PrimaryStats.Speed) / 100f));
    }
Beispiel #5
0
    public void Initialize(int index, Hero hero, BossBattleInterface UIinterface)
    {
        this.UIinterface = UIinterface;
        skill            = hero.Skills[index];
        cooldown         = hero.Skills[index]._cooldown;

        SetCooldown();

        highlight = GetComponent <Image>();

        skillImage.sprite = skill.LoadSprite();
        _vines            = GetComponentsInChildren <VineMovement>().ToList();

        tooltip.Initialize(skill, hero);

        passiveNotifier.SetActive(skill.skillType == SkillTypes.Passive);
    }