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