Exemple #1
0
        public virtual void Dispose()
        {
            m_bDisposing = true;
            //if (m_autoAnimator != null)
            //    m_autoAnimator.Dispose();
            if (m_mb != null)
            {
                m_mb.RemoveSprite(this);
            }
            if (m_spParent != null)
            {
                m_spParent.RemoveChild(this);
            }

            for (int i = m_aBehaviors.Count - 1; i >= 0; i--)
            {
                Behavior bh = (Behavior)m_aBehaviors[i];
                bh.Dispose();
            }

            for (int i = this.ChildCount - 1; i >= 0; i--)
            {
                this[i].Dispose();
            }

            m_renderStrategy.Dispose();
        }