void Update() { float skillCooldown = hero.skillCooldown; float skillCooldownCount = hero.skillCooldownCount; if (skillCooldownCount < skillCooldown) { button.interactable = false; if (!circleProgressBarGameObject.activeInHierarchy) { circleProgressBarGameObject.SetActive(true); } circleProgressBarComponent.SetSettings(skillCooldown, skillCooldownCount); } else { button.interactable = true; circleProgressBar.gameObject.SetActive(false); } }
/// <summary> /// Подготовить прогресс бары /// </summary> public void PrepareCicrleBar() { circleBarMaxValue = Wave.startWaveTimer; currentCircleBarValue = circleBarMaxValue; circleBar.SetSettings(circleBarMaxValue, 0); }