public override void Start() { base.Start(); DamageCreateContext dct = new DamageCreateContext(); dct.SrcUID = m_srcID; dct.DamageValue = m_damageValue; dct.HitShowID = m_hitShowID; if (m_owner != null) { if (m_owner.IsDead() == false) { m_owner.OnDamage(dct); } } }
public override void OnDamage(DamageCreateContext damage) { base.OnDamage(damage); SetProp(PropID.HP, -damage.DamageValue); if (IsDead()) { DeadContext deadCtx = new DeadContext(); deadCtx.SrcEntityID = damage.SrcUID; OnDead(deadCtx); return; } m_entityView.PlayEfficacyView(damage.HitShowID); float fcurhp = GetProp(PropID.HP); float fmaxhp = GetProp(PropID.MaxHP); if (BloodChange != null) { BloodChange(fcurhp, fmaxhp); } }
public virtual void OnDamage(DamageCreateContext damage) { }