Example #1
0
    protected virtual void Attack(BaseLive other)
    {
        m_buffReceive.OnPreAttackFunc.Invoke(DamagePackUs);
        DamagePack pack = DealAttack(other);

        other.BeHurted(pack);
        m_buffReceive.OnNextAttackFunc.Invoke(DamagePackUs);
    }
Example #2
0
 /// <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>());
     }
 }
Example #3
0
 public virtual void Mount(BaseLive live)
 {
     if (m_isMounted == false)
     {
         m_isMounted  = true;
         m_mountedObj = live;
         OnAdd();
     }
 }
Example #4
0
 protected override DamagePack DealAttack(BaseLive other)
 {
     throw new System.NotImplementedException();
 }
Example #5
0
 protected abstract DamagePack DealAttack(BaseLive other);
Example #6
0
 public DamagePack(BaseLive _attcker = null, float _damage = 0f, DamageType _type = DamageType.CommonAttack)
 {
     attacker   = _attcker;
     damageVal  = _damage;
     damageType = _type;
 }
Example #7
0
 public virtual void Remove()
 {
     m_isMounted  = false;
     m_mountedObj = null;
     OnRemove();
 }