Esempio n. 1
0
        public float GetStatePercentLeft()
        {
            if (CurState == null || CurState.Type == UnitStateType.Rest)
            {
                return(1f);
            }

            if (IsPlayerSide)
            {
                if (CurState.Type != UnitStateType.Empowering)
                {
                    return(1f - CurState.CurStateTime / CurState.GetTotalTime());
                }
                else
                {
                    return(System.Math.Min(1f, (float)m_CurEmpowerTap / TapEmpower));
                }
            }
            else
            {
                return(1f - CurState.CurStateTime / CurState.GetTotalTime());
            }
        }