// 方案1 public void Recovery(object sender, RecoverEventArgs e) { GameObject gameObject = e.objRecovery; gameObject.transform.SetParent(container); gameObject.SetActive(false); pool.Enqueue(gameObject); }
void _container_Recover(object sender, RecoverEventArgs e) { if (!this.IsInitialized) { if (null == base.RequestInitialization) { e.Cancel = true; return; } base.RequestInitialization(this); } }
protected virtual void OnRecover() { RecoverEventArgs rea = new RecoverEventArgs(); if (null != this.Recover) { Recover(this, rea); } if (rea.Cancel) { return; } this._paginater.IsFrozen = (this.Operation != OperationType.Viewing); this.OnBindControls(); this.OnExtract(); this.IsRecovered = true; }