public override void updateChargesDisplay(int abilityNumber) { float _charges = charges[abilityNumber]; // update the charges containers[abilityNumber].updateCharges((int)charges[abilityNumber]); // update the cooldown bar if (_charges > 0 && _charges <= 1) { icons[abilityNumber].cooldownBar.fillAmount = 1 - _charges; } else if (icons[abilityNumber].cooldownBar) { icons[abilityNumber].cooldownBar.fillAmount = 0; } // update tooltips AbilityTooltip.updateAllManaCosts(); }