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