示例#1
0
 protected override void OnStay()
 {
     base.OnStay();
     if (m_CurStateInfo.IsName(E_AnimatorIndex.MoveEnd.ToString()) && m_CurStateInfo.normalizedTime >= 1)
     {
         MonoBehaviourManager.Remove(m_Owner);
         PoolManager.DestroyGameObject(m_Owner.gameObject, PoolType.Bullet);
     }
 }
示例#2
0
 void Destroy()
 {
     if (_particle != null)
     {
         _particle.Stop();
     }
     MonoBehaviourManager.Remove(this);
     PoolManager.DestroyGameObject(gameObject, PoolType.Effect);
 }
示例#3
0
    protected override void OnUpdate()
    {
        base.OnUpdate();
        m_Fsm.OnStay();

        _timeCount += GameManager.DeltaTime;
        if (_timeCount >= m_BulletCfg.Life && CurStatus == E_BulletFsmStatus.Running)
        {
            _timeCount = 0;
            MonoBehaviourManager.Remove(this);
            PoolManager.DestroyGameObject(gameObject, PoolType.Bullet);
        }
    }
示例#4
0
 void OnDestroy()
 {
     MonoBehaviourManager.Remove(this);
 }
示例#5
0
 public virtual void OnDestory()
 {
     MonoBehaviourManager.Remove(this);
 }