Ejemplo n.º 1
0
        void initEntity()
        {
            m_FsmLayer    = new LenovoMirageARSDK.OOBE.FSMLayer();
            m_DestroyFunc = null;
            InitState();

            if (m_Disposable != null)
            {
                m_Disposable.Dispose();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 手动卸载或传递Transform跟随Transform周期
        /// </summary>
        public virtual void Destroy()
        {
            if (m_Disposable != null)
            {
                m_Disposable.Dispose();
                m_Disposable = null;
            }

            if (m_FsmLayer != null)
            {
                m_FsmLayer.Close();
                m_FsmLayer = null;
            }

            (this as IEntity).RemoveEntity();

            OnDestroy();

            if (m_DestroyFunc != null)
            {
                m_DestroyFunc();
                m_DestroyFunc = null;
            }
        }