// 方案1
    public void Recovery(object sender, RecoverEventArgs e)
    {
        GameObject gameObject = e.objRecovery;

        gameObject.transform.SetParent(container);
        gameObject.SetActive(false);
        pool.Enqueue(gameObject);
    }
Пример #2
0
 void _container_Recover(object sender, RecoverEventArgs e)
 {
     if (!this.IsInitialized)
     {
         if (null == base.RequestInitialization)
         {
             e.Cancel = true;
             return;
         }
         base.RequestInitialization(this);
     }
 }
Пример #3
0
        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;
        }