예제 #1
0
    void Update()
    {
        if (hero == null)
        {
            return;
        }

        //Handle CD
        cooldown = (float)(DateTime.Now - hero.lastUsedTapAbility).TotalSeconds;

        if (cooldown >= cooldownTotal)
        {
            cooldown = cooldownTotal;
        }

        skillProgress = (1f - (cooldown / cooldownTotal));

        if (controller.IsAbilityTypeInPlay(hero.tapSkill.type))
        {
            // Grays out the ability if there is a similar one being used already
            skillProgress = 1f;
        }
        skillCooldown.fillAmount = skillProgress;

        if (trackTouch)
        {
            tapduration += Time.deltaTime;
        }

        if (tapduration > 0.25f)
        {
            tooltip.ShowTooltip();
        }
    }
예제 #2
0
    void Update()
    {
        if (!trackTouch)
        {
            return;
        }

        tapduration += Time.deltaTime;

        if (tapduration > 0.25f)
        {
            tooltip.ShowTooltip();
        }
    }
예제 #3
0
 public void PointerDown()
 {
     tooltip.ShowTooltip();
 }
예제 #4
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     tooltip.ShowTooltip(Skill);
 }