void UpdateInterface() { //get cooldown state float percents = PlayerStatsController.Instance.GetCooldownPercents(); Bar.SetFill(percents); }
// Update is called once per frame void Update() { if (muzzleFlashTimer > muzzleFlashTime && muzzleFlash.activeSelf) { muzzleFlash.SetActive(false); } else { muzzleFlashTimer += Time.deltaTime; } coolDownTimer += Time.deltaTime; if (cooldownBar != null) { cooldownBar.SetFill(coolDownTimer, currGun.cooldownTime); } }