Example #1
0
    private void OnGaugeValueChanged()
    {
        if (m_PlayerStunInfoSC != null)
        {
            float gaugeRatio = m_PlayerStunInfoSC.GetCurrentGaugeValue() / AttackConfig.Instance.m_StunGaugeMaxValue;
            m_GaugeImage.fillAmount = gaugeRatio;

            if (gaugeRatio < 1f)
            {
                m_GaugeTextAmount.text = ((uint)(m_PlayerStunInfoSC.GetCurrentGaugeValue())).ToString();
            }
            else
            {
                m_GaugeTextAmount.text = K_STUNNED_TEXT;
            }
        }
    }