// hp, mp public void ShowNumberPanel(AsUserEntity userEntity, int nValue, eATTRCHANGECONTENTS eContents, eCustomFontType eType, eDAMAGETYPE eDamageType) { if( null == userEntity) return; if( eATTRCHANGECONTENTS.eATTRCHANGECONTENTS_USING_SKILL == eContents || eATTRCHANGECONTENTS.eATTRCHANGECONTENTS_KILLNPC == eContents) { if( nValue <= 0) return; int nRes = nValue; float fSpeed = 1.0f; float fScale = 1.2f; if( eCustomFontType.eCustomFontType_HP == eType) { float maxHP = userEntity.GetProperty<float>( eComponentProperty.HP_MAX); float curHP = userEntity.GetProperty<float>( eComponentProperty.HP_CUR); float subHP = maxHP - curHP; if( subHP < nValue) nRes = (int)subHP; fSpeed = m_fSpeed_Damage_HP; fScale = m_fScale_Damage_HP; } else if( eCustomFontType.eCustomFontType_MP == eType) { float maxMP = userEntity.GetProperty<float>( eComponentProperty.MP_MAX); float curMP = userEntity.GetProperty<float>( eComponentProperty.MP_CUR); float subMP = maxMP - curMP; if( subMP < nValue) nRes = (int)subMP; fSpeed = m_fSpeed_Damage_MP; fScale = m_fScale_Damage_MP; } if( nRes >= 0) { if( eDAMAGETYPE.eDAMAGETYPE_CRITICAL == eDamageType) _ShowNumberPanel( userEntity.transform.gameObject, "!", 2, true, true, m_fSpeed_Damage_Critical, m_fScale_Damage_Critical); // critical user string str = _GetCustomFont( nRes, eType); _ShowNumberPanel( userEntity.transform.gameObject, str, 0, false, false, fSpeed, fScale); // HP, MP user } } else if( eATTRCHANGECONTENTS.eATTRCHANGECONTENTS_DOT_DAMAGE == eContents) { // if( nValue <= 0) // return; // // float maxHP = userEntity.GetProperty<float>( eComponentProperty.HP_MAX); // float curHP = userEntity.GetProperty<float>( eComponentProperty.HP_CUR); // float subHP = maxHP - curHP; // int nRes = nValue; // if( subHP < nValue) // nRes = (int)subHP; // // if( nRes > 0) // { // string str = _GetCustomFont( nRes, eType); // _ShowNumberPanel( userEntity.transform.gameObject, str, 0, false, false, m_fSpeed_Damage_DotHeal, m_fScale_Damage_DotHeal); // Dot Healling user // } string str = ""; int nRes = nValue; if( nValue <= 0) { nRes *= -1; //str = nRes.ToString(); // dot damage str = _GetCustomFont( nRes, eCustomFontType.eCustomFontType_AllyDamage); } else str = _GetCustomFont( nRes, eType); // dot healling _ShowNumberPanel( userEntity.transform.gameObject, str, 0, false, false, m_fSpeed_Damage_DotHeal, m_fScale_Damage_DotHeal); // Dot Healling user } else if( eATTRCHANGECONTENTS.eATTRCHANGECONTENTS_HP_INSTEAD_MP == eContents) { int nRes = nValue; if( nValue <= 0) nRes *= -1; if( eDAMAGETYPE.eDAMAGETYPE_CRITICAL == eDamageType) _ShowNumberPanel( userEntity.transform.gameObject, "!", 2, true, true, m_fSpeed_Damage_Critical, m_fScale_Damage_Critical); // critical user _ShowNumberPanel( userEntity.transform.gameObject, nRes.ToString(), 0, true, false, m_fSpeed_Damage, m_fScale_Damage); // damage(red font) } }
// hp, mp public void ShowNumberPanel(AsUserEntity userEntity, int nValue, eATTRCHANGECONTENTS eContents, eCustomFontType eType) { ShowNumberPanel( userEntity, nValue, eContents, eType, eDAMAGETYPE.eDAMAGETYPE_NORMAL); }