// Token: 0x06004959 RID: 18777 RVA: 0x00117E0C File Offset: 0x0011600C
 private void Update()
 {
     if (this.disableWhenFinished != AnimationOrTween.DisableCondition.DoNotDisable && this.mTweens != null)
     {
         bool flag  = true;
         bool flag2 = true;
         int  i     = 0;
         int  num   = this.mTweens.Length;
         while (i < num)
         {
             global::UITweener uitweener = this.mTweens[i];
             if (uitweener.enabled)
             {
                 flag = false;
                 break;
             }
             if (uitweener.direction != (AnimationOrTween.Direction) this.disableWhenFinished)
             {
                 flag2 = false;
             }
             i++;
         }
         if (flag)
         {
             if (flag2)
             {
                 global::NGUITools.SetActive(this.tweenTarget, false);
             }
             this.mTweens = null;
         }
     }
 }
Esempio n. 2
0
        static StackObject *ResetToBeginning_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            global::UITweener instance_of_this_method = (global::UITweener)typeof(global::UITweener).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            __intp.Free(ptr_of_this_method);

            instance_of_this_method.ResetToBeginning();

            return(__ret);
        }
Esempio n. 3
0
        static StackObject *set_tweenFactor_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single @value = *(float *)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            global::UITweener instance_of_this_method = (global::UITweener)typeof(global::UITweener).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            __intp.Free(ptr_of_this_method);

            instance_of_this_method.tweenFactor = value;

            return(__ret);
        }
Esempio n. 4
0
        static StackObject *Play_5(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Boolean @forward = ptr_of_this_method->Value == 1;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            global::UITweener instance_of_this_method = (global::UITweener)typeof(global::UITweener).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Play(@forward);

            return(__ret);
        }
Esempio n. 5
0
        static StackObject *Add_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            global::UITweener @item = (global::UITweener)typeof(global::UITweener).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Collections.Generic.List <global::UITweener> instance_of_this_method = (System.Collections.Generic.List <global::UITweener>) typeof(System.Collections.Generic.List <global::UITweener>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Add(@item);

            return(__ret);
        }
Esempio n. 6
0
        static StackObject *AddOnFinished_6(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            global::EventDelegate.Callback @del = (global::EventDelegate.Callback) typeof(global::EventDelegate.Callback).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            global::UITweener instance_of_this_method = (global::UITweener)typeof(global::UITweener).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            __intp.Free(ptr_of_this_method);

            instance_of_this_method.AddOnFinished(@del);

            return(__ret);
        }
    // Token: 0x0600495A RID: 18778 RVA: 0x00117EA0 File Offset: 0x001160A0
    public void Play(bool forward)
    {
        GameObject gameObject = (!(this.tweenTarget == null)) ? this.tweenTarget : base.gameObject;

        if (!gameObject.activeInHierarchy)
        {
            if (this.ifDisabledOnPlay != AnimationOrTween.EnableCondition.EnableThenPlay)
            {
                return;
            }
            global::NGUITools.SetActive(gameObject, true);
        }
        this.mTweens = ((!this.includeChildren) ? gameObject.GetComponents <global::UITweener>() : gameObject.GetComponentsInChildren <global::UITweener>());
        if (this.mTweens.Length == 0)
        {
            if (this.disableWhenFinished != AnimationOrTween.DisableCondition.DoNotDisable)
            {
                global::NGUITools.SetActive(this.tweenTarget, false);
            }
        }
        else
        {
            bool flag = false;
            if (this.playDirection == AnimationOrTween.Direction.Reverse)
            {
                forward = !forward;
            }
            int i   = 0;
            int num = this.mTweens.Length;
            while (i < num)
            {
                global::UITweener uitweener = this.mTweens[i];
                if (uitweener.tweenGroup == this.tweenGroup)
                {
                    if (!flag && !gameObject.activeInHierarchy)
                    {
                        flag = true;
                        global::NGUITools.SetActive(gameObject, true);
                    }
                    if (this.playDirection == AnimationOrTween.Direction.Toggle)
                    {
                        uitweener.Toggle();
                    }
                    else
                    {
                        uitweener.Play(forward);
                    }
                    if (this.resetOnPlay)
                    {
                        uitweener.Reset();
                    }
                    if (this.eventReceiver != null && !string.IsNullOrEmpty(this.callWhenFinished))
                    {
                        uitweener.eventReceiver    = this.eventReceiver;
                        uitweener.callWhenFinished = this.callWhenFinished;
                    }
                }
                i++;
            }
        }
    }