Ejemplo n.º 1
0
    void UpdateInterface()
    {
        //get cooldown state
        float percents = PlayerStatsController.Instance.GetCooldownPercents();

        Bar.SetFill(percents);
    }
Ejemplo n.º 2
0
    // 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);
        }
    }