protected virtual void OnDragDropStart()
 {
     //IL_00a0: Unknown result type (might be due to invalid IL or missing references)
     //IL_00a5: Expected O, but got Unknown
     //IL_0103: Unknown result type (might be due to invalid IL or missing references)
     //IL_0108: Unknown result type (might be due to invalid IL or missing references)
     //IL_011b: Unknown result type (might be due to invalid IL or missing references)
     //IL_0156: Unknown result type (might be due to invalid IL or missing references)
     //IL_015b: Expected O, but got Unknown
     if (!draggedItems.Contains(this))
     {
         draggedItems.Add(this);
     }
     if (mDragScrollView != null)
     {
         mDragScrollView.set_enabled(false);
     }
     if (mButton != null)
     {
         mButton.isEnabled = false;
     }
     else if (mCollider != null)
     {
         mCollider.set_enabled(false);
     }
     else if (mCollider2D != null)
     {
         mCollider2D.set_enabled(false);
     }
     mParent = mTrans.get_parent();
     mRoot = NGUITools.FindInParents<UIRoot>(mParent);
     mGrid = NGUITools.FindInParents<UIGrid>(mParent);
     mTable = NGUITools.FindInParents<UITable>(mParent);
     if (UIDragDropRoot.root != null)
     {
         mTrans.set_parent(UIDragDropRoot.root);
     }
     Vector3 localPosition = mTrans.get_localPosition();
     localPosition.z = 0f;
     mTrans.set_localPosition(localPosition);
     TweenPosition component = this.GetComponent<TweenPosition>();
     if (component != null)
     {
         component.set_enabled(false);
     }
     SpringPosition component2 = this.GetComponent<SpringPosition>();
     if (component2 != null)
     {
         component2.set_enabled(false);
     }
     NGUITools.MarkParentAsChanged(this.get_gameObject());
     if (mTable != null)
     {
         mTable.repositionNow = true;
     }
     if (mGrid != null)
     {
         mGrid.repositionNow = true;
     }
 }
Esempio n. 2
0
 private IEnumerator ChangePanelLeft(SmithManager.SmithGrowData data)
 {
     centerAnim.set_enabled(true);
     centerAnim.ResetToBeginning();
     centerAnim.duration = 0.1f;
     centerAnim.from     = defaultCenterPos;
     centerAnim.to       = new Vector3(defaultCenterPos.x + 200f, defaultCenterPos.y, defaultCenterPos.z);
     centerAnim.PlayForward();
     rightAnim.set_enabled(true);
     rightAnim.ResetToBeginning();
     rightAnim.duration = 0.1f;
     rightAnim.from     = defaultRightPos;
     rightAnim.to       = new Vector3(defaultRightPos.x + 200f, defaultRightPos.y, defaultRightPos.z);
     rightAnim.PlayForward();
     leftAnim.set_enabled(true);
     leftAnim.ResetToBeginning();
     leftAnim.duration = 0.1f;
     leftAnim.from     = defaultLeftPos;
     leftAnim.to       = new Vector3(defaultLeftPos.x + 200f, defaultLeftPos.y, defaultLeftPos.z);
     leftAnim.PlayForward();
     while (centerAnim.get_enabled())
     {
         yield return((object)null);
     }
     SetModifyPanel(data);
     centerAnim.set_enabled(true);
     centerAnim.ResetToBeginning();
     centerAnim.duration = 0.1f;
     centerAnim.from     = new Vector3(defaultCenterPos.x - 200f, defaultCenterPos.y, defaultCenterPos.z);
     centerAnim.to       = defaultCenterPos;
     centerAnim.PlayForward();
     rightAnim.set_enabled(true);
     rightAnim.ResetToBeginning();
     rightAnim.duration = 0.1f;
     rightAnim.from     = new Vector3(defaultRightPos.x - 200f, defaultRightPos.y, defaultRightPos.z);
     rightAnim.to       = defaultRightPos;
     rightAnim.PlayForward();
     leftAnim.set_enabled(true);
     leftAnim.ResetToBeginning();
     leftAnim.duration = 0.1f;
     leftAnim.from     = new Vector3(defaultLeftPos.x - 200f, defaultLeftPos.y, defaultLeftPos.z);
     leftAnim.to       = defaultLeftPos;
     leftAnim.PlayForward();
 }
Esempio n. 3
0
    private IEnumerator DoLoadModel()
    {
        InitRenderTexture(UI.TEX_MODEL, 45f, false);
        SmithManager.SmithGrowData smith_data = MonoBehaviourSingleton <SmithManager> .I.GetSmithData <SmithManager.SmithGrowData>();

        int max = smith_data.evolveData.evolveEquipDataTable.Length;

        itemModelRoot = Utility.CreateGameObject("ItemModelRoot", GetRenderTextureModelTransform(UI.TEX_MODEL), -1);
        itemModelRoot.set_localPosition(Vector3.get_up() * 100f);
        itemModelRoot.set_localEulerAngles(Vector3.get_zero());
        itemModels = (Transform[])new Transform[max];
        bool[] load_complete = new bool[max];
        for (int l = 0; l < max; l++)
        {
            LoadItemModelData(l, max, delegate(int index)
            {
                ((_003CDoLoadModel_003Ec__Iterator13A) /*Error near IL_0101: stateMachine*/)._003Cload_complete_003E__2[index] = true;
            });
        }
        while (true)
        {
            bool is_wait = false;
            for (int k = 0; k < max; k++)
            {
                if (!load_complete[k])
                {
                    is_wait = true;
                    break;
                }
            }
            if (!is_wait)
            {
                break;
            }
            yield return((object)null);
        }
        SmithManager.SmithGrowData data = MonoBehaviourSingleton <SmithManager> .I.GetSmithData <SmithManager.SmithGrowData>();

        defaultModelPos = itemModels[data.evolveData.selectIndex].get_transform().get_localPosition();
        animPosList     = new List <TweenPosition>();
        for (int j = 0; j < max; j++)
        {
            TweenPosition animPos = itemModels[j].get_gameObject().AddComponent <TweenPosition>();
            animPosList.Add(animPos);
            animPos.set_enabled(false);
        }
        for (int i = 0; i < max; i++)
        {
            if (i != data.evolveData.selectIndex)
            {
                itemModels[i].set_localPosition(new Vector3(10f, 0f, 0f));
            }
        }
        EnableRenderTexture(UI.TEX_MODEL);
    }
Esempio n. 4
0
 private void OnDisable()
 {
     if (this.mStarted && this.tweenTarget != null)
     {
         TweenPosition component = this.tweenTarget.GetComponent <TweenPosition>();
         if (component != null)
         {
             component.value = this.mPos;
             component.set_enabled(false);
         }
     }
 }
Esempio n. 5
0
    protected virtual void OnDragDropStart()
    {
        if (this.mDragScrollView != null)
        {
            this.mDragScrollView.set_enabled(false);
        }
        if (this.mButton != null)
        {
            this.mButton.isEnabled = false;
        }
        else if (this.mCollider != null)
        {
            this.mCollider.set_enabled(false);
        }
        else if (this.mCollider2D != null)
        {
            this.mCollider2D.set_enabled(false);
        }
        this.mParent = this.mTrans.get_parent();
        this.mRoot   = NGUITools.FindInParents <UIRoot>(this.mParent);
        this.mGrid   = NGUITools.FindInParents <UIGrid>(this.mParent);
        this.mTable  = NGUITools.FindInParents <UITable>(this.mParent);
        if (UIDragDropRoot.root != null)
        {
            this.mTrans.set_parent(UIDragDropRoot.root);
        }
        Vector3 localPosition = this.mTrans.get_localPosition();

        localPosition.z = 0f;
        this.mTrans.set_localPosition(localPosition);
        TweenPosition component = base.GetComponent <TweenPosition>();

        if (component != null)
        {
            component.set_enabled(false);
        }
        SpringPosition component2 = base.GetComponent <SpringPosition>();

        if (component2 != null)
        {
            component2.set_enabled(false);
        }
        NGUITools.MarkParentAsChanged(base.get_gameObject());
        if (this.mTable != null)
        {
            this.mTable.repositionNow = true;
        }
        if (this.mGrid != null)
        {
            this.mGrid.repositionNow = true;
        }
    }
Esempio n. 6
0
 private void OnDisable()
 {
     //IL_0036: Unknown result type (might be due to invalid IL or missing references)
     if (mStarted && tweenTarget != null)
     {
         TweenPosition component = tweenTarget.GetComponent <TweenPosition>();
         if (component != null)
         {
             component.value = mPos;
             component.set_enabled(false);
         }
     }
 }
Esempio n. 7
0
    public static TweenPosition Begin(GameObject go, float duration, Vector3 pos)
    {
        TweenPosition tweenPosition = UITweener.Begin <TweenPosition>(go, duration);

        tweenPosition.from = tweenPosition.value;
        tweenPosition.to   = pos;
        if (duration <= 0f)
        {
            tweenPosition.Sample(1f, true);
            tweenPosition.set_enabled(false);
        }
        return(tweenPosition);
    }
Esempio n. 8
0
    public static TweenPosition Begin(GameObject go, float duration, Vector3 pos)
    {
        //IL_000b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0010: Unknown result type (might be due to invalid IL or missing references)
        //IL_0016: Unknown result type (might be due to invalid IL or missing references)
        //IL_0017: Unknown result type (might be due to invalid IL or missing references)
        TweenPosition tweenPosition = UITweener.Begin <TweenPosition>(go, duration, true);

        tweenPosition.from = tweenPosition.value;
        tweenPosition.to   = pos;
        if (duration <= 0f)
        {
            tweenPosition.Sample(1f, true);
            tweenPosition.set_enabled(false);
        }
        return(tweenPosition);
    }
        private TweenPosition PlayMove(Vector3 from, Vector3 to, float time, Action Onfinished, bool isActive, bool isReverse = false)
        {
            TweenPosition tweenPosition = this.tweenPosition;

            tweenPosition.set_enabled(true);
            tweenPosition.ResetToBeginning();
            tweenPosition.from     = from;
            tweenPosition.to       = to;
            tweenPosition.duration = time;
            tweenPosition.onFinished.Clear();
            tweenPosition.SetOnFinished(delegate
            {
                if (Onfinished != null)
                {
                    Onfinished.Invoke();
                }
                this.SetActive(isActive);
            });
            tweenPosition.animationCurve = ((!isReverse) ? this.ForwardCurve : this.ReverseCurve);
            tweenPosition.PlayForward();
            return(tweenPosition);
        }
    public bool Initialize(Character _chara, int damage, DAMAGE_COLOR color, ELEMENT_TYPE element, bool isAutoPlay = true)
    {
        //IL_001f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0025: Unknown result type (might be due to invalid IL or missing references)
        //IL_002a: Unknown result type (might be due to invalid IL or missing references)
        //IL_009f: Unknown result type (might be due to invalid IL or missing references)
        //IL_00bc: Unknown result type (might be due to invalid IL or missing references)
        //IL_00dd: Unknown result type (might be due to invalid IL or missing references)
        //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
        //IL_0114: Unknown result type (might be due to invalid IL or missing references)
        //IL_012a: Unknown result type (might be due to invalid IL or missing references)
        //IL_01b2: Unknown result type (might be due to invalid IL or missing references)
        //IL_01b7: Unknown result type (might be due to invalid IL or missing references)
        chara       = _chara;
        higthOffset = damadeNum.height;
        if (!SetPosFromWorld(chara._position + offset, true))
        {
            return(false);
        }
        enable         = true;
        damadeNum.text = damage.ToString();
        switch (color)
        {
        case DAMAGE_COLOR.DAMAGE:
            if (elementColor.Count >= 0 && elementColor.Count > (int)element)
            {
                damadeNum.color       = elementColor[(int)element].main;
                damadeNum.effectColor = elementColor[(int)element].effect;
            }
            else
            {
                damadeNum.color       = elementColor[6].main;
                damadeNum.effectColor = elementColor[6].effect;
            }
            break;

        case DAMAGE_COLOR.HEAL:
            damadeNum.color       = healColor.main;
            damadeNum.effectColor = healColor.effect;
            break;
        }
        if (animPos != null)
        {
            animPos.ResetToBeginning();
            animPos.set_enabled(false);
        }
        if (animAlpha != null)
        {
            animAlpha.ResetToBeginning();
            animAlpha.set_enabled(false);
        }
        if (animScale != null)
        {
            animScale.ResetToBeginning();
            animScale.set_enabled(false);
        }
        this.get_transform().set_localScale(Vector3.get_zero());
        if (isAutoPlay)
        {
            Play();
        }
        return(true);
    }