// 造成傷害及傷害字特效 private void CauseEffectToUnit( UnitDamageSystem _dmgSys ) { float damagevalue = 10.0f * Time.deltaTime ; string attackerDisplayName = m_WeaponDataShared.UnitObjectName ; UnitData attackerUnitData = m_WeaponDataShared.ObjUnitData() ; if( null != attackerUnitData ) attackerDisplayName = attackerUnitData.GetUnitDisplayName() ; _dmgSys.ActiveDamageNumberEffectNextTime( true , 1 ) ; _dmgSys.CauseDamageValueOut( m_WeaponDataShared.UnitObjectName , attackerDisplayName , damagevalue , ConstName.UnitDataComponentUnitIntagraty ) ; }
protected virtual void Hit( UnitDamageSystem _DmgSys , string hitComponentName ) { // 取得攻擊者顯示字串 string attackerUnitDisplayName = m_WeaponDataShared.UnitObjectName ; UnitData attackerUnitData = m_WeaponDataShared.ObjUnitData() ; if( null != attackerUnitData ) attackerUnitDisplayName = attackerUnitData.GetUnitDisplayName() ; _DmgSys.ActiveDamageEffectByTime( this.gameObject , hitComponentName , 1.0f ) ; _DmgSys.ActiveDamageNumberEffectNextTime( true , 3.0f ) ; _DmgSys.CauseDamageValueOut( m_WeaponDataShared.UnitObjectName , attackerUnitDisplayName , m_WeaponDataShared.m_CauseDamage , hitComponentName ) ; CloseFireAnimation() ; }