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); } }
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); } }
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); } }
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); } }
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); } }
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); }