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(); } }
void Update() { if (!trackTouch) { return; } tapduration += Time.deltaTime; if (tapduration > 0.25f) { tooltip.ShowTooltip(); } }
public void PointerDown() { tooltip.ShowTooltip(); }
public void OnPointerEnter(PointerEventData eventData) { tooltip.ShowTooltip(Skill); }