Beispiel #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);
     }
 }
Beispiel #2
0
 void Destroy()
 {
     if (_particle != null)
     {
         _particle.Stop();
     }
     MonoBehaviourManager.Remove(this);
     PoolManager.DestroyGameObject(gameObject, PoolType.Effect);
 }
Beispiel #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);
        }
    }
Beispiel #4
0
 void OnDestroy()
 {
     MonoBehaviourManager.Remove(this);
 }
Beispiel #5
0
 public virtual void OnDestory()
 {
     MonoBehaviourManager.Remove(this);
 }