public void MoveTo(Vector2 vP, float time, Action <int> act, iTween.EaseType type = iTween.EaseType.linear, float delay = 0f)
 {
     if (0f >= time)
     {
         this.SetPosX(vP.x);
         this.SetPosY(vP.y);
         if (act != null)
         {
             act(0);
         }
     }
     else
     {
         this.movedAct = act;
         Hashtable hashtable = new Hashtable();
         hashtable.Add("isLocal", true);
         hashtable.Add("x", vP.x);
         hashtable.Add("y", vP.y);
         hashtable.Add("time", EfcCont.GetFixedTime(time));
         hashtable.Add("delay", delay);
         hashtable.Add("easetype", type);
         hashtable.Add("oncomplete", "MoveEnd");
         hashtable.Add("oncompleteparams", 0);
         iTween.MoveTo(base.gameObject, hashtable);
     }
 }
 public void ColorTo(Color c, float time, Action <int> act, iTween.EaseType type = iTween.EaseType.linear, float delay = 0f)
 {
     if (0f >= time)
     {
         this.SetColor(c);
         if (act != null)
         {
             act(0);
         }
     }
     else if (null == this.ngSpr && null == this.ngWdg)
     {
         if (act != null)
         {
             act(0);
         }
     }
     else
     {
         this.coloredAct = act;
         Hashtable hashtable = new Hashtable();
         if (null != this.ngSpr)
         {
             hashtable.Add("from", this.ngSpr.color);
         }
         else if (null != this.ngWdg)
         {
             hashtable.Add("from", this.ngWdg.color);
         }
         hashtable.Add("to", c);
         hashtable.Add("time", EfcCont.GetFixedTime(time));
         hashtable.Add("delay", delay);
         hashtable.Add("onupdate", "UpdateColor");
         hashtable.Add("easetype", type);
         hashtable.Add("oncomplete", "colorEnd");
         hashtable.Add("oncompleteparams", 0);
         iTween.ValueTo(base.gameObject, hashtable);
     }
 }
 public void ScaleTo(Vector2 vS, float time, Action <int> act, iTween.EaseType type = iTween.EaseType.linear, float delay = 0f)
 {
     if (0f >= time)
     {
         this.SetScale(vS);
         if (act != null)
         {
             act(0);
         }
     }
     else
     {
         this.scaledAct = act;
         Hashtable hashtable = new Hashtable();
         hashtable.Add("x", vS.x);
         hashtable.Add("y", vS.y);
         hashtable.Add("time", EfcCont.GetFixedTime(time));
         hashtable.Add("delay", delay);
         hashtable.Add("easetype", type);
         hashtable.Add("oncomplete", "ScaleEnd");
         hashtable.Add("oncompleteparams", 0);
         iTween.ScaleTo(base.gameObject, hashtable);
     }
 }
    protected virtual void MakeAnimation(bool open, float atime, iTween.EaseType type = iTween.EaseType.linear)
    {
        float num;
        float num2;

        if (open)
        {
            num  = 0f;
            num2 = 1f;
        }
        else
        {
            num  = 1f;
            num2 = 0f;
        }
        this.isScaled = false;
        try
        {
            if (base.gameObject == null)
            {
            }
        }
        catch
        {
            this.ScaleEnd(0);
            return;
        }
        if (atime <= 0f)
        {
            base.gameObject.transform.localScale = new Vector3(num2, num2, 1f);
            this.ScaleEnd(0);
            this.Update();
        }
        else
        {
            CommonDialog.MOVE_BEHAVIOUR move_BEHAVIOUR = this.moveBehavior;
            switch (move_BEHAVIOUR + 1)
            {
            case CommonDialog.MOVE_BEHAVIOUR.XY_SCALE:
                base.gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
                this.isScaled = true;
                return;

            case CommonDialog.MOVE_BEHAVIOUR.X_SCALE:
                base.gameObject.transform.localScale = new Vector3(num, num, 1f);
                break;

            case CommonDialog.MOVE_BEHAVIOUR.Y_SCALE:
                base.gameObject.transform.localScale = new Vector3(num, 1f, 1f);
                break;

            case CommonDialog.MOVE_BEHAVIOUR.MOVE_FROM_LEFT:
                base.gameObject.transform.localScale = new Vector3(1f, num, 1f);
                break;

            case CommonDialog.MOVE_BEHAVIOUR.MOVE_FROM_RIGHT:
            {
                Vector3 localPosition = base.gameObject.transform.localPosition;
                localPosition.x = -this.moveLength;
                base.gameObject.transform.localPosition = localPosition;
                break;
            }

            case CommonDialog.MOVE_BEHAVIOUR.XY_SCALE_CLOSE:
            {
                Vector3 localPosition = base.gameObject.transform.localPosition;
                localPosition.x = this.moveLength;
                base.gameObject.transform.localPosition = localPosition;
                break;
            }

            case (CommonDialog.MOVE_BEHAVIOUR) 6:
                if (open)
                {
                    base.gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
                }
                else
                {
                    base.gameObject.transform.localScale = new Vector3(num, num, 1f);
                }
                break;
            }
            Hashtable hashtable = new Hashtable();
            hashtable.Add("from", num);
            hashtable.Add("to", num2);
            hashtable.Add("time", EfcCont.GetFixedTime(atime));
            hashtable.Add("onupdate", "UpdateScale");
            hashtable.Add("easetype", type);
            hashtable.Add("oncomplete", "ScaleEnd");
            hashtable.Add("oncompleteparams", 0);
            iTween.ValueTo(base.gameObject, hashtable);
        }
    }