protected virtual void Attack(BaseLive other) { m_buffReceive.OnPreAttackFunc.Invoke(DamagePackUs); DamagePack pack = DealAttack(other); other.BeHurted(pack); m_buffReceive.OnNextAttackFunc.Invoke(DamagePackUs); }
/// <summary> /// 初始化时候 必须将生物类传入 /// </summary> /// <param name="live"></param> public BuffReceive(BaseLive live) { m_addLive = live; for (int i = 0; i < (int)ShowType.End; i++) { m_mountDict.Add((ShowType)i, new Dictionary <int, BaseBuff>()); } }
public virtual void Mount(BaseLive live) { if (m_isMounted == false) { m_isMounted = true; m_mountedObj = live; OnAdd(); } }
protected override DamagePack DealAttack(BaseLive other) { throw new System.NotImplementedException(); }
protected abstract DamagePack DealAttack(BaseLive other);
public DamagePack(BaseLive _attcker = null, float _damage = 0f, DamageType _type = DamageType.CommonAttack) { attacker = _attcker; damageVal = _damage; damageType = _type; }
public virtual void Remove() { m_isMounted = false; m_mountedObj = null; OnRemove(); }