コード例 #1
0
        virtual public void FreeObject(IHtmlObject obj)
        {
            obj.Release();

            //可能已经被GameObject tree deleted了,不再回收
            if (obj.displayObject != null && obj.displayObject.isDisposed)
            {
                return;
            }

            if (obj is HtmlImage)
            {
                _imagePool.Push(obj);
            }
            else if (obj is HtmlInput)
            {
                _inputPool.Push(obj);
            }
            else if (obj is HtmlButton)
            {
                _buttonPool.Push(obj);
            }
            else if (obj is HtmlLink)
            {
                _linkPool.Push(obj);
            }
        }
コード例 #2
0
        virtual public void FreeObject(IHtmlObject obj)
        {
            obj.Release();
            if (!Application.isPlaying)
            {
                obj.Dispose();
                return;
            }

            if (obj is HtmlImage)
            {
                _imagePool.Push(obj);
            }
            else if (obj is HtmlInput)
            {
                _inputPool.Push(obj);
            }
            else if (obj is HtmlButton)
            {
                _buttonPool.Push(obj);
            }
            else if (obj is HtmlLink)
            {
                _linkPool.Push(obj);
            }
        }
コード例 #3
0
        virtual public void FreeObject(IHtmlObject obj)
        {
            obj.Release();
            if (!Application.isPlaying)
            {
                obj.Dispose();
                return;
            }

            //可能已经被GameObject tree deleted了,不再回收
            if (obj.displayObject != null && obj.displayObject.isDisposed)
            {
                return;
            }

            if (obj is HtmlImage)
            {
                _imagePool.Push(obj);
            }
            else if (obj is HtmlInput)
            {
                _inputPool.Push(obj);
            }
            else if (obj is HtmlButton)
            {
                _buttonPool.Push(obj);
            }
            else if (obj is HtmlLink)
            {
                _linkPool.Push(obj);
            }

            if (obj.displayObject != null)
            {
                if (_poolManager == null)
                {
                    _poolManager = Stage.inst.CreatePoolManager("HtmlObjectPool");
                }

                ToolSet.SetParent(obj.displayObject.cachedTransform, _poolManager);
            }
        }
コード例 #4
0
        virtual public void FreeObject(IHtmlObject obj)
        {
            if (_poolManager == null)
            {
                obj.Dispose();
                return;
            }

            //可能已经被GameObject tree deleted了,不再回收
            if (obj.displayObject != null && obj.displayObject.isDisposed)
            {
                obj.Dispose();
                return;
            }

            obj.Release();
            if (obj is HtmlImage)
            {
                _imagePool.Push(obj);
            }
            else if (obj is HtmlInput)
            {
                _inputPool.Push(obj);
            }
            else if (obj is HtmlButton)
            {
                _buttonPool.Push(obj);
            }
            else if (obj is HtmlLink)
            {
                _linkPool.Push(obj);
            }

            if (obj.displayObject != null)
            {
                obj.displayObject.cachedTransform.SetParent(_poolManager, false);
            }
        }
コード例 #5
0
        public virtual void FreeObject(IHtmlObject obj)
        {
            obj.Release();
            if (!Application.isPlaying)
            {
                obj.Dispose();
                return;
            }

            //可能已经被GameObject tree deleted了,不再回收
            if (obj.displayObject != null && obj.displayObject.isDisposed)
                return;

            if (obj is HtmlImage)
                _imagePool.Push(obj);
            else if (obj is HtmlInput)
                _inputPool.Push(obj);
            else if (obj is HtmlButton)
                _buttonPool.Push(obj);
            else if (obj is HtmlLink)
                _linkPool.Push(obj);

            if (obj.displayObject != null)
            {
                if (_poolManager == null)
                    _poolManager = Stage.inst.CreatePoolManager("HtmlObjectPool");

                ToolSet.SetParent(obj.displayObject.cachedTransform, _poolManager);
            }
        }
コード例 #6
0
        public virtual void FreeObject(IHtmlObject obj)
        {
            obj.Release();
            if (!Application.isPlaying)
            {
                obj.Dispose();
                return;
            }

            if (obj is HtmlImage)
                _imagePool.Push(obj);
            else if (obj is HtmlInput)
                _inputPool.Push(obj);
            else if (obj is HtmlButton)
                _buttonPool.Push(obj);
            else if (obj is HtmlLink)
                _linkPool.Push(obj);
        }