Esempio n. 1
0
    public void Update()
    {
        if (!IsUsing)
        {
            return;
        }
        if (bulletType == eBulletType.Target)
        {
            m_dir = (m_target.Pos - m_caster.Pos).normalized;
        }


        m_effect.Pos    += m_dir * m_fSpeed * Time.deltaTime;
        m_effect.Forward = m_dir;

        //击中处理
        if (IsHit() && null != m_hitNotify)
        {
            m_effect.SetActive(false);
            IsUsing = false;
            m_hitNotify(m_caster, m_target, m_skillInfo);
        }

        duration -= Time.deltaTime;
        //子弹攻击距离已过
        if (duration <= 0)
        {
            m_effect.SetActive(false);
            IsUsing = false;
        }
    }
Esempio n. 2
0
 //buff 结束
 public virtual void BuffEnd()
 {
     //隐藏特效
     if (effect != null)
     {
         effect.SetActive(false);
     }
 }