Пример #1
0
 //内部清理,决绝外部调用
 protected virtual void OnReset()
 {
     if (m_entityDriveVisual != null)
     {
         m_entityDriveVisual.Close();
         m_entityDriveVisual = null;
     }
     if (m_entityDriveMove != null)
     {
         m_entityDriveMove.Close();
         m_entityDriveMove = null;
     }
     if (m_entityView != null)
     {
         m_entityView.Close();
     }
     m_entityView = null;
 }
Пример #2
0
        // 实体销毁
        public void Release()
        {
            Engine.IRenderSystem rs = Engine.RareEngine.Instance().GetRenderSystem();
            if (rs == null)
            {
                return;
            }
            foreach (var part in m_Parts)
            {
                part.Value.Release();
            }

            EntityViewCreator.Instance.RemoveView(m_lID);

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