protected virtual void OnDragDropRelease(GameObject surface)
 {
     //IL_00b3: Unknown result type (might be due to invalid IL or missing references)
     //IL_00c3: Unknown result type (might be due to invalid IL or missing references)
     //IL_00c8: Unknown result type (might be due to invalid IL or missing references)
     //IL_00db: Unknown result type (might be due to invalid IL or missing references)
     //IL_00fe: Unknown result type (might be due to invalid IL or missing references)
     //IL_0103: Expected O, but got Unknown
     //IL_0142: Unknown result type (might be due to invalid IL or missing references)
     //IL_0149: Unknown result type (might be due to invalid IL or missing references)
     //IL_014e: Expected O, but got Unknown
     //IL_0199: Unknown result type (might be due to invalid IL or missing references)
     //IL_019e: Expected O, but got Unknown
     if (!cloneOnDrag)
     {
         if (mButton != null)
         {
             mButton.isEnabled = true;
         }
         else if (mCollider != null)
         {
             mCollider.set_enabled(true);
         }
         else if (mCollider2D != null)
         {
             mCollider2D.set_enabled(true);
         }
         UIDragDropContainer uIDragDropContainer = (!Object.op_Implicit(surface)) ? null : NGUITools.FindInParents<UIDragDropContainer>(surface);
         if (uIDragDropContainer != null)
         {
             mTrans.set_parent((!(uIDragDropContainer.reparentTarget != null)) ? ((object)uIDragDropContainer.get_transform()) : ((object)uIDragDropContainer.reparentTarget));
             Vector3 localPosition = mTrans.get_localPosition();
             localPosition.z = 0f;
             mTrans.set_localPosition(localPosition);
         }
         else
         {
             mTrans.set_parent(mParent);
         }
         mParent = mTrans.get_parent();
         mGrid = NGUITools.FindInParents<UIGrid>(mParent);
         mTable = NGUITools.FindInParents<UITable>(mParent);
         if (mDragScrollView != null)
         {
             this.StartCoroutine(EnableDragScrollView());
         }
         NGUITools.MarkParentAsChanged(this.get_gameObject());
         if (mTable != null)
         {
             mTable.repositionNow = true;
         }
         if (mGrid != null)
         {
             mGrid.repositionNow = true;
         }
         OnDragDropEnd();
     }
     else
     {
         NGUITools.Destroy(this.get_gameObject());
     }
 }
Ejemplo n.º 2
0
 protected virtual void OnDragDropRelease(GameObject surface)
 {
     if (!this.cloneOnDrag)
     {
         if (this.mButton != null)
         {
             this.mButton.isEnabled = true;
         }
         else if (this.mCollider != null)
         {
             this.mCollider.set_enabled(true);
         }
         else if (this.mCollider2D != null)
         {
             this.mCollider2D.set_enabled(true);
         }
         UIDragDropContainer uIDragDropContainer = (!surface) ? null : NGUITools.FindInParents <UIDragDropContainer>(surface);
         if (uIDragDropContainer != null)
         {
             this.mTrans.set_parent((!(uIDragDropContainer.reparentTarget != null)) ? uIDragDropContainer.get_transform() : uIDragDropContainer.reparentTarget);
             Vector3 localPosition = this.mTrans.get_localPosition();
             localPosition.z = 0f;
             this.mTrans.set_localPosition(localPosition);
         }
         else
         {
             this.mTrans.set_parent(this.mParent);
         }
         this.mParent = this.mTrans.get_parent();
         this.mGrid   = NGUITools.FindInParents <UIGrid>(this.mParent);
         this.mTable  = NGUITools.FindInParents <UITable>(this.mParent);
         if (this.mDragScrollView != null)
         {
             base.StartCoroutine(this.EnableDragScrollView());
         }
         NGUITools.MarkParentAsChanged(base.get_gameObject());
         if (this.mTable != null)
         {
             this.mTable.repositionNow = true;
         }
         if (this.mGrid != null)
         {
             this.mGrid.repositionNow = true;
         }
         this.OnDragDropEnd();
     }
     else
     {
         NGUITools.Destroy(base.get_gameObject());
     }
 }