public static UpdateAttr ( float val, Operate_Type opType, float tVal ) : float | ||
val | float | |
opType | Operate_Type | |
tVal | float | |
return | float |
public void SetHp(Operate_Type opType, int tVal) { int key = CharacterProperty.Key; m_Hp = (int)CharacterProperty.UpdateAttr(m_Hp, m_ActualProperty.HpMax * key, opType, tVal); m_PropertyChanged = true; }
public void SetEnergy(Operate_Type opType, int tVal) { int key = CharacterProperty.Key; int result = (int)CharacterProperty.UpdateAttr(m_Energy, m_ActualProperty.EnergyMax * key, opType, tVal); if (result > m_ActualProperty.EnergyMax * key) { result = m_ActualProperty.EnergyMax * key; } else if (result < 0) { result = 0; } m_Energy = result; m_PropertyChanged = true; }
public void SetShield(Operate_Type opType, int tVal) { const int c_MaxShield = 500; int key = CharacterProperty.Key; int result = (int)CharacterProperty.UpdateAttr(m_Shield, c_MaxShield * key, opType, tVal); if (result > c_MaxShield * key) { result = c_MaxShield * key; } else if (result < 0) { result = 0; } m_Shield = result; m_PropertyChanged = true; }