Ejemplo n.º 1
0
        /**
         * @private
         */
        protected override void _onClear()
        {
            base._onClear();

            var disposeDisplayList = new List <object>();

            for (int i = 0, l = _displayList.Count; i < l; ++i)
            {
                var eachDisplay = _displayList[i];
                if (
                    eachDisplay != _rawDisplay && eachDisplay != _meshDisplay &&
                    !disposeDisplayList.Contains(eachDisplay)
                    )
                {
                    disposeDisplayList.Add(eachDisplay);
                }
            }

            for (int i = 0, l = disposeDisplayList.Count; i < l; ++i)
            {
                var eachDisplay = disposeDisplayList[i];
                if (eachDisplay is Armature)
                {
                    (eachDisplay as Armature).Dispose();
                }
                else
                {
                    _disposeDisplay(eachDisplay);
                }
            }

            if (_meshDisplay != null && _meshDisplay != _rawDisplay) // May be _meshDisplay and _rawDisplay is the same one.
            {
                _disposeDisplay(_meshDisplay);
            }

            if (_rawDisplay != null)
            {
                _disposeDisplay(_rawDisplay);
            }

            displayController = null;

            _displayDirty     = false;
            _zOrderDirty      = false;
            _blendModeDirty   = false;
            _colorDirty       = false;
            _originalDirty    = false;
            _transformDirty   = false;
            _meshDirty        = false;
            _updateState      = -1;
            _blendMode        = BlendMode.Normal;
            _displayIndex     = -1;
            _cachedFrameIndex = -1;
            _zOrder           = -1;
            _pivotX           = 0.0f;
            _pivotY           = 0.0f;
            _localMatrix.Identity();
            _colorTransform.Identity();
            _ffdVertices.Clear();
            _displayList.Clear();
            _replacedDisplayDatas.Clear();
            _meshBones.Clear();
            _skinSlotData        = null;
            _displayData         = null;
            _replacedDisplayData = null;
            _textureData         = null;
            _meshData            = null;
            _boundingBoxData     = null;
            _rawDisplay          = null;
            _meshDisplay         = null;
            _display             = null;
            _childArmature       = null;
            _cachedFrameIndices  = null;
        }
Ejemplo n.º 2
0
        /**
         * @inheritDoc
         */
        protected override void _onClear()
        {
            base._onClear();

            var disposeDisplayList = new List <object>();

            foreach (var eachDisplay in _displayList)
            {
                if (
                    eachDisplay != _rawDisplay && eachDisplay != _meshDisplay &&
                    !disposeDisplayList.Contains(eachDisplay)
                    )
                {
                    disposeDisplayList.Add(eachDisplay);
                }
            }

            foreach (var eachDisplay in disposeDisplayList)
            {
                if (eachDisplay is Armature)
                {
                    ((Armature)eachDisplay).Dispose();
                }
                else
                {
                    _disposeDisplay(eachDisplay);
                }
            }

            if (_meshDisplay != null && _meshDisplay != _rawDisplay) // May be _meshDisplay and _rawDisplay is the same one.
            {
                _disposeDisplay(_meshDisplay);
            }

            if (_rawDisplay != null)
            {
                _disposeDisplay(_rawDisplay);
            }

            inheritAnimation  = true;
            displayController = null;

            _blendIndex     = -1;
            _zOrder         = 0;
            _displayDataSet = null;
            _meshData       = null;
            _childArmature  = null;
            _rawDisplay     = null;
            _meshDisplay    = null;
            _cacheFrames    = null;
            _colorTransform.Identity();
            _ffdVertices.Clear();
            _replacedDisplayDataSet.Clear();

            _zOrderDirty     = false;
            _displayDirty    = false;
            _blendModeDirty  = false;
            _colorDirty      = false;
            _originDirty     = false;
            _transformDirty  = false;
            _ffdDirty        = false;
            _displayIndex    = -2;
            _cacheFrameIndex = -1;
            _blendMode       = BlendMode.Normal;
            _pivotX          = 0.0f;
            _pivotY          = 0.0f;
            _display         = null;
            _localMatrix.Identity();
            _displayList.Clear();
            _meshBones.Clear();
        }