Exemple #1
0
    private IEnumerator EndEffectOnCrystal()
    {
        if (!(animForEffectOnCrystal == null))
        {
            animForEffectOnCrystal.Play(STATE_END, 0, 0f);
            yield return((object)null);

            while (true)
            {
                AnimatorStateInfo currentAnimatorStateInfo = animForEffectOnBase.GetCurrentAnimatorStateInfo(0);
                if (currentAnimatorStateInfo.get_fullPathHash() == STATE_END_INCLUDE_LAYER)
                {
                    break;
                }
                yield return((object)null);
            }
            while (true)
            {
                AnimatorStateInfo currentAnimatorStateInfo2 = animForEffectOnCrystal.GetCurrentAnimatorStateInfo(0);
                if (!(currentAnimatorStateInfo2.get_normalizedTime() <= 1f))
                {
                    break;
                }
                yield return((object)null);
            }
            if (effectTransForCrystal != null)
            {
                Object.Destroy(effectTransForCrystal.get_gameObject());
                effectTransForCrystal = null;
            }
        }
    }
Exemple #2
0
 private void Awake()
 {
     //IL_0002: Unknown result type (might be due to invalid IL or missing references)
     //IL_0007: Expected O, but got Unknown
     //IL_008a: Unknown result type (might be due to invalid IL or missing references)
     //IL_008f: Unknown result type (might be due to invalid IL or missing references)
     _transform = this.get_transform();
     if ((particles == null || particles.Length == 0) && autoCollectParticles)
     {
         particles = this.GetComponentsInChildren <ParticleSystem>();
     }
     if (animator == null)
     {
         Animator component = this.GetComponent <Animator>();
         if (component != null)
         {
             animator = component;
         }
         else
         {
             animator = null;
         }
     }
     if (animator != null)
     {
         AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0);
         defaultStateHash = currentAnimatorStateInfo.get_fullPathHash();
         int num = Animator.StringToHash("END");
         if (animator.HasState(0, num))
         {
             endStateHash = num;
         }
     }
 }
    private IEnumerator OnPickedEffect()
    {
        if (!(m_effectAnimator == null) && !(m_effectCtrl == null))
        {
            m_effectAnimator.Play(ANIM_STATE_PICKED, 0, 0f);
            yield return((object)null);

            while (true)
            {
                AnimatorStateInfo currentAnimatorStateInfo = m_effectAnimator.GetCurrentAnimatorStateInfo(0);
                if (currentAnimatorStateInfo.get_fullPathHash() == ANIM_STATE_PICKED_INCLUDE_LAYER)
                {
                    break;
                }
                yield return((object)null);
            }
            while (true)
            {
                AnimatorStateInfo currentAnimatorStateInfo2 = m_effectAnimator.GetCurrentAnimatorStateInfo(0);
                if (!(currentAnimatorStateInfo2.get_normalizedTime() < 1f))
                {
                    break;
                }
                yield return((object)null);
            }
            if (m_effectCtrl.waitParticlePlaying)
            {
                for (int i = 0; i < m_effectCtrl.particles.Length; i++)
                {
                    ParticleSystem ps = m_effectCtrl.particles[i];
                    if (ps != null && ps.get_isPlaying())
                    {
                        ps.Stop(true);
                        yield return((object)null);
                    }
                }
            }
            if (m_cachedEffectTransform != null && m_cachedEffectTransform.get_gameObject() != null)
            {
                bool isStock = false;
                if (MonoBehaviourSingleton <EffectManager> .IsValid())
                {
                    isStock = MonoBehaviourSingleton <EffectManager> .I.StockOrDestroy(m_cachedEffectTransform.get_gameObject(), false);
                }
                if (!isStock)
                {
                    Object.Destroy(m_cachedEffectTransform.get_gameObject());
                }
            }
            if (this.get_gameObject() != null)
            {
                Object.Destroy(this.get_gameObject());
            }
        }
    }
 private void UpdateAnim()
 {
     //IL_0017: Unknown result type (might be due to invalid IL or missing references)
     //IL_002f: Unknown result type (might be due to invalid IL or missing references)
     //IL_0034: Unknown result type (might be due to invalid IL or missing references)
     //IL_003c: Unknown result type (might be due to invalid IL or missing references)
     //IL_0041: Unknown result type (might be due to invalid IL or missing references)
     if (!(animator == null) && !(animator.get_runtimeAnimatorController() == null))
     {
         AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0);
         AnimatorStateInfo nextAnimatorStateInfo    = animator.GetNextAnimatorStateInfo(0);
         int num = animStateHashs[56];
         if (currentAnimatorStateInfo.get_fullPathHash() == num || nextAnimatorStateInfo.get_fullPathHash() == num)
         {
             PLCA playingAnim;
             if (lastAnimHash == 0)
             {
                 playingAnim = this.playingAnim;
                 Play(defaultAnim, false);
             }
             else
             {
                 playingAnim = lastPlayingAnim;
                 Play(this.playingAnim, false);
             }
             if (onEnd != null)
             {
                 onEnd(this, playingAnim);
             }
         }
         num = animStateHashs[(int)this.playingAnim];
         if (currentAnimatorStateInfo.get_fullPathHash() != num && nextAnimatorStateInfo.get_fullPathHash() != num && currentAnimatorStateInfo.get_fullPathHash() != viaAnimHash && (loopAnimHash == 0 || (currentAnimatorStateInfo.get_fullPathHash() != loopAnimHash && nextAnimatorStateInfo.get_fullPathHash() != loopAnimHash)) && (lastAnimHash == 0 || (currentAnimatorStateInfo.get_fullPathHash() != lastAnimHash && nextAnimatorStateInfo.get_fullPathHash() != lastAnimHash)))
         {
             PlayAnimator(this.playingAnim, false);
             if (onChange != null)
             {
                 onChange(this, this.playingAnim);
             }
         }
     }
 }
 public void Play(PLCA anim, bool instant = false)
 {
     //IL_0044: Unknown result type (might be due to invalid IL or missing references)
     //IL_0049: Unknown result type (might be due to invalid IL or missing references)
     //IL_0051: Unknown result type (might be due to invalid IL or missing references)
     //IL_0056: Unknown result type (might be due to invalid IL or missing references)
     if (playingAnim == anim)
     {
         lastAnimHash = 0;
     }
     else
     {
         if (instant)
         {
             PlayAnimator(anim, instant);
         }
         else if (loopAnimHash != 0 && endAnimHash != 0)
         {
             AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0);
             AnimatorStateInfo nextAnimatorStateInfo    = animator.GetNextAnimatorStateInfo(0);
             if (currentAnimatorStateInfo.get_fullPathHash() == loopAnimHash || nextAnimatorStateInfo.get_fullPathHash() == loopAnimHash)
             {
                 animator.CrossFade(endAnimHash, transitionDuration, 0);
                 lastAnimHash    = endAnimHash;
                 lastPlayingAnim = playingAnim;
             }
         }
         string str = animStateNames[(int)anim];
         viaAnimHash = Animator.StringToHash("Base Layer." + str + "_VIA");
         if (!animator.HasState(0, viaAnimHash))
         {
             viaAnimHash = 0;
         }
         loopAnimHash = Animator.StringToHash("Base Layer." + str + "_LOOP");
         if (!animator.HasState(0, loopAnimHash))
         {
             loopAnimHash = 0;
         }
         if (loopAnimHash != 0)
         {
             endAnimHash = Animator.StringToHash("Base Layer." + str + "_END");
             if (!animator.HasState(0, endAnimHash))
             {
                 endAnimHash = 0;
             }
         }
         playingAnim = anim;
         if (onPlay != null)
         {
             onPlay(this, anim);
         }
     }
 }
    public bool IsCurrentState(PLCA anim)
    {
        //IL_001f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0024: Unknown result type (might be due to invalid IL or missing references)
        if (PLCA.NORMAL > anim || (int)anim >= animStateHashs.Length)
        {
            return(false);
        }
        AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0);

        if (currentAnimatorStateInfo.get_fullPathHash() != animStateHashs[(int)anim])
        {
            return(false);
        }
        return(true);
    }
 private void Update()
 {
     //IL_0018: Unknown result type (might be due to invalid IL or missing references)
     //IL_001d: Unknown result type (might be due to invalid IL or missing references)
     if (m_effectAnimator != null)
     {
         AnimatorStateInfo currentAnimatorStateInfo = m_effectAnimator.GetCurrentAnimatorStateInfo(0);
         if (currentAnimatorStateInfo.get_fullPathHash() == ANIM_STATE_LOOP_INCLUDE_LAYER)
         {
             m_cachedCollider.set_enabled(true);
         }
     }
     if (m_state == STATE.ACTIVE && m_lifeSpanType == BulletData.BulletPresent.LIFE_SPAN_TYPE.TIME)
     {
         if (m_lifeSpan <= 0f)
         {
             OnDisappear();
         }
         m_lifeSpan -= Time.get_deltaTime();
     }
 }
 public void OnFlick()
 {
     //IL_0052: Unknown result type (might be due to invalid IL or missing references)
     //IL_0057: Unknown result type (might be due to invalid IL or missing references)
     if (!(m_effectRestraint == null) && IsValidFlickInput)
     {
         Animator component = m_effectRestraint.GetComponent <Animator>();
         if (!(component == null))
         {
             int num = Animator.StringToHash("ACT");
             if (component.HasState(0, num))
             {
                 AnimatorStateInfo currentAnimatorStateInfo = component.GetCurrentAnimatorStateInfo(0);
                 if (currentAnimatorStateInfo.get_fullPathHash() != Animator.StringToHash("END"))
                 {
                     component.Play(num, 0, 0f);
                     component.Update(0f);
                 }
             }
         }
     }
 }
Exemple #9
0
 protected virtual void Update()
 {
     //IL_0049: Unknown result type (might be due to invalid IL or missing references)
     //IL_004e: Unknown result type (might be due to invalid IL or missing references)
     if (!(_animator == null))
     {
         _animator.set_speed((!skip) ? 1f : 10000f);
         if (playingStateHash != 0)
         {
             AnimatorStateInfo currentAnimatorStateInfo = _animator.GetCurrentAnimatorStateInfo(0);
             if (currentAnimatorStateInfo.get_fullPathHash() == playingStateHash && currentAnimatorStateInfo.get_normalizedTime() >= 1f)
             {
                 playingStateHash = 0;
                 if (endCallback != null)
                 {
                     Action action = endCallback;
                     endCallback = null;
                     action();
                 }
             }
         }
     }
 }
Exemple #10
0
 private void UpdateEffectOnWeapon()
 {
     //IL_0041: Unknown result type (might be due to invalid IL or missing references)
     //IL_0046: Unknown result type (might be due to invalid IL or missing references)
     //IL_00ad: Unknown result type (might be due to invalid IL or missing references)
     //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
     //IL_00cc: Unknown result type (might be due to invalid IL or missing references)
     if (!effectAnimatorOnWeaponList.IsNullOrEmpty())
     {
         for (int i = 0; i < effectAnimatorOnWeaponList.Count; i++)
         {
             if (!(effectAnimatorOnWeaponList[i] == null))
             {
                 AnimatorStateInfo currentAnimatorStateInfo = effectAnimatorOnWeaponList[i].GetCurrentAnimatorStateInfo(0);
                 int fullPathHash = currentAnimatorStateInfo.get_fullPathHash();
                 if (IsComboLvMax())
                 {
                     if (fullPathHash != HASH_EFFECT_ON_WEAPON_FULL)
                     {
                         effectAnimatorOnWeaponList[i].Play(HASH_EFFECT_ON_WEAPON_FULL);
                     }
                 }
                 else
                 {
                     if (fullPathHash != HASH_EFFECT_ON_WEAPON_DEFAULT)
                     {
                         effectAnimatorOnWeaponList[i].Play(HASH_EFFECT_ON_WEAPON_DEFAULT);
                     }
                     Vector3 localScale = effectTransOnWeaponList[i].get_localScale();
                     localScale.z = GetGaugeRate();
                     effectTransOnWeaponList[i].set_localScale(localScale);
                 }
             }
         }
     }
 }
    private void LateUpdate()
    {
        //IL_0012: Unknown result type (might be due to invalid IL or missing references)
        //IL_006d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0073: Unknown result type (might be due to invalid IL or missing references)
        //IL_0084: Unknown result type (might be due to invalid IL or missing references)
        //IL_0089: Unknown result type (might be due to invalid IL or missing references)
        //IL_0099: Unknown result type (might be due to invalid IL or missing references)
        //IL_009e: Unknown result type (might be due to invalid IL or missing references)
        //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e2: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
        //IL_013d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0142: Unknown result type (might be due to invalid IL or missing references)
        //IL_0183: Unknown result type (might be due to invalid IL or missing references)
        //IL_018a: Expected O, but got Unknown
        //IL_0190: Unknown result type (might be due to invalid IL or missing references)
        //IL_01cd: Unknown result type (might be due to invalid IL or missing references)
        //IL_01d2: Unknown result type (might be due to invalid IL or missing references)
        //IL_01d6: Unknown result type (might be due to invalid IL or missing references)
        //IL_01db: Unknown result type (might be due to invalid IL or missing references)
        //IL_01e2: Unknown result type (might be due to invalid IL or missing references)
        //IL_01e7: Unknown result type (might be due to invalid IL or missing references)
        //IL_01e8: Unknown result type (might be due to invalid IL or missing references)
        //IL_01ed: Unknown result type (might be due to invalid IL or missing references)
        //IL_020e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0219: Unknown result type (might be due to invalid IL or missing references)
        //IL_022f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0234: Unknown result type (might be due to invalid IL or missing references)
        //IL_0247: Unknown result type (might be due to invalid IL or missing references)
        //IL_024c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0251: Unknown result type (might be due to invalid IL or missing references)
        //IL_0252: Unknown result type (might be due to invalid IL or missing references)
        //IL_0257: Unknown result type (might be due to invalid IL or missing references)
        //IL_0259: Unknown result type (might be due to invalid IL or missing references)
        //IL_025a: Unknown result type (might be due to invalid IL or missing references)
        //IL_025c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0261: Unknown result type (might be due to invalid IL or missing references)
        //IL_0269: Unknown result type (might be due to invalid IL or missing references)
        //IL_0270: Unknown result type (might be due to invalid IL or missing references)
        //IL_0280: Unknown result type (might be due to invalid IL or missing references)
        //IL_0285: Unknown result type (might be due to invalid IL or missing references)
        //IL_029d: Unknown result type (might be due to invalid IL or missing references)
        //IL_02be: Unknown result type (might be due to invalid IL or missing references)
        //IL_02ef: Unknown result type (might be due to invalid IL or missing references)
        if (targetObject == null)
        {
            this.get_gameObject().SetActive(false);
        }
        else
        {
            if (animEventProcessor != null)
            {
                animEventProcessor.Update();
            }
            switch (animationStep)
            {
            case AnimationStep.MOVE_TO_TARGET_POS:
            {
                animationTimer += Time.get_deltaTime();
                Vector3 position2 = Vector3.Lerp(dropPos, targetPos, animationTimer / MOVE_TO_TARGET_TIME);
                float   x         = position2.x;
                Vector3 position3 = _transform.get_position();
                position2._002Ector(x, position3.y, position2.z);
                _transform.set_position(position2);
                if (animationTimer >= MOVE_TO_TARGET_TIME)
                {
                    animationStep = AnimationStep.DROP_TO_GROUND;
                }
                break;
            }

            case AnimationStep.DROP_TO_GROUND:
            {
                AnimatorStateInfo currentAnimatorStateInfo2 = animator.GetCurrentAnimatorStateInfo(0);
                if (currentAnimatorStateInfo2.get_fullPathHash() == endAnimHash)
                {
                    targetPoint   = this.GetComponent <TargetPoint>();
                    animationStep = AnimationStep.NONE;
                }
                if (isRare)
                {
                    SoundManager.PlayOneShotUISE(10000061);
                }
                else
                {
                    SoundManager.PlayOneShotUISE(10000062);
                }
                break;
            }

            case AnimationStep.OPEN:
            {
                AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0);
                if (currentAnimatorStateInfo.get_fullPathHash() == openAnimHash && currentAnimatorStateInfo.get_normalizedTime() > 0.99f)
                {
                    animationStep = AnimationStep.NONE;
                    if (effect != null)
                    {
                        EffectManager.ReleaseEffect(effect.get_gameObject(), true, false);
                    }
                    this.get_gameObject().SetActive(false);
                }
                break;
            }

            case AnimationStep.GET:
                if (distanceAnim.IsPlaying())
                {
                    moveTime += Time.get_deltaTime();
                    Bounds  bounds    = targetObject._collider.get_bounds();
                    Vector3 center    = bounds.get_center();
                    Vector3 val       = _transform.get_position() - center;
                    float   magnitude = val.get_magnitude();
                    if (distance < magnitude)
                    {
                        distance = magnitude;
                    }
                    val = val.get_normalized() * distance * (1f - distanceAnim.Update());
                    Vector3 val2     = Quaternion.AngleAxis(moveTime * speedAnim.Update(), Vector3.get_up()) * val;
                    Vector3 position = center + val2;
                    _transform.set_position(position);
                    Vector3 localScale = Vector3.get_one() * scaleAnim.Update();
                    if (distanceAnim.IsPlaying())
                    {
                        _transform.set_localScale(localScale);
                    }
                }
                else
                {
                    Transform val3 = EffectManager.GetEffect("ef_btl_mpdrop_01", null);
                    val3.set_position(_transform.get_position());
                    rymFX component = val3.GetComponent <rymFX>();
                    if (component != null)
                    {
                        component.AutoDelete = true;
                        component.LoopEnd    = true;
                    }
                    this.get_gameObject().SetActive(false);
                }
                break;
            }
        }
    }
    private void Update()
    {
        if (!this.valid)
        {
            return;
        }
        if (this.layerMixModes.Length != this.animator.get_layerCount())
        {
            Array.Resize <SkeletonAnimator.MixMode>(ref this.layerMixModes, this.animator.get_layerCount());
        }
        float num = Time.get_time() - this.lastTime;

        this.skeleton.Update(Time.get_deltaTime());
        int layerCount = this.animator.get_layerCount();

        for (int i = 0; i < layerCount; i++)
        {
            float num2 = this.animator.GetLayerWeight(i);
            if (i == 0)
            {
                num2 = 1f;
            }
            AnimatorStateInfo        currentAnimatorStateInfo = this.animator.GetCurrentAnimatorStateInfo(i);
            AnimatorStateInfo        nextAnimatorStateInfo    = this.animator.GetNextAnimatorStateInfo(i);
            AnimatorClipInfo[]       currentAnimatorClipInfo  = this.animator.GetCurrentAnimatorClipInfo(i);
            AnimatorClipInfo[]       nextAnimatorClipInfo     = this.animator.GetNextAnimatorClipInfo(i);
            SkeletonAnimator.MixMode mixMode = this.layerMixModes[i];
            if (mixMode == SkeletonAnimator.MixMode.AlwaysMix)
            {
                for (int j = 0; j < currentAnimatorClipInfo.Length; j++)
                {
                    AnimatorClipInfo animatorClipInfo = currentAnimatorClipInfo[j];
                    float            num3             = animatorClipInfo.get_weight() * num2;
                    if (num3 != 0f)
                    {
                        float num4 = currentAnimatorStateInfo.get_normalizedTime() * animatorClipInfo.get_clip().get_length();
                        this.animationTable.get_Item(this.GetAnimationClipNameHashCode(animatorClipInfo.get_clip())).Mix(this.skeleton, Mathf.Max(0f, num4 - num), num4, currentAnimatorStateInfo.get_loop(), null, num3);
                    }
                }
                if (nextAnimatorStateInfo.get_fullPathHash() != 0)
                {
                    for (int k = 0; k < nextAnimatorClipInfo.Length; k++)
                    {
                        AnimatorClipInfo animatorClipInfo2 = nextAnimatorClipInfo[k];
                        float            num5 = animatorClipInfo2.get_weight() * num2;
                        if (num5 != 0f)
                        {
                            float num6 = nextAnimatorStateInfo.get_normalizedTime() * animatorClipInfo2.get_clip().get_length();
                            this.animationTable.get_Item(this.GetAnimationClipNameHashCode(animatorClipInfo2.get_clip())).Mix(this.skeleton, Mathf.Max(0f, num6 - num), num6, nextAnimatorStateInfo.get_loop(), null, num5);
                        }
                    }
                }
            }
            else if (mixMode >= SkeletonAnimator.MixMode.MixNext)
            {
                int l;
                for (l = 0; l < currentAnimatorClipInfo.Length; l++)
                {
                    AnimatorClipInfo animatorClipInfo3 = currentAnimatorClipInfo[l];
                    float            num7 = animatorClipInfo3.get_weight() * num2;
                    if (num7 != 0f)
                    {
                        float num8 = currentAnimatorStateInfo.get_normalizedTime() * animatorClipInfo3.get_clip().get_length();
                        this.animationTable.get_Item(this.GetAnimationClipNameHashCode(animatorClipInfo3.get_clip())).Apply(this.skeleton, Mathf.Max(0f, num8 - num), num8, currentAnimatorStateInfo.get_loop(), null);
                        break;
                    }
                }
                while (l < currentAnimatorClipInfo.Length)
                {
                    AnimatorClipInfo animatorClipInfo4 = currentAnimatorClipInfo[l];
                    float            num9 = animatorClipInfo4.get_weight() * num2;
                    if (num9 != 0f)
                    {
                        float num10 = currentAnimatorStateInfo.get_normalizedTime() * animatorClipInfo4.get_clip().get_length();
                        this.animationTable.get_Item(this.GetAnimationClipNameHashCode(animatorClipInfo4.get_clip())).Mix(this.skeleton, Mathf.Max(0f, num10 - num), num10, currentAnimatorStateInfo.get_loop(), null, num9);
                    }
                    l++;
                }
                l = 0;
                if (nextAnimatorStateInfo.get_fullPathHash() != 0)
                {
                    if (mixMode == SkeletonAnimator.MixMode.SpineStyle)
                    {
                        while (l < nextAnimatorClipInfo.Length)
                        {
                            AnimatorClipInfo animatorClipInfo5 = nextAnimatorClipInfo[l];
                            float            num11             = animatorClipInfo5.get_weight() * num2;
                            if (num11 != 0f)
                            {
                                float num12 = nextAnimatorStateInfo.get_normalizedTime() * animatorClipInfo5.get_clip().get_length();
                                this.animationTable.get_Item(this.GetAnimationClipNameHashCode(animatorClipInfo5.get_clip())).Apply(this.skeleton, Mathf.Max(0f, num12 - num), num12, nextAnimatorStateInfo.get_loop(), null);
                                break;
                            }
                            l++;
                        }
                    }
                    while (l < nextAnimatorClipInfo.Length)
                    {
                        AnimatorClipInfo animatorClipInfo6 = nextAnimatorClipInfo[l];
                        float            num13             = animatorClipInfo6.get_weight() * num2;
                        if (num13 != 0f)
                        {
                            float num14 = nextAnimatorStateInfo.get_normalizedTime() * animatorClipInfo6.get_clip().get_length();
                            this.animationTable.get_Item(this.GetAnimationClipNameHashCode(animatorClipInfo6.get_clip())).Mix(this.skeleton, Mathf.Max(0f, num14 - num), num14, nextAnimatorStateInfo.get_loop(), null, num13);
                        }
                        l++;
                    }
                }
            }
        }
        if (this._UpdateLocal != null)
        {
            this._UpdateLocal(this);
        }
        this.skeleton.UpdateWorldTransform();
        if (this._UpdateWorld != null)
        {
            this._UpdateWorld(this);
            this.skeleton.UpdateWorldTransform();
        }
        if (this._UpdateComplete != null)
        {
            this._UpdateComplete(this);
        }
        this.lastTime = Time.get_time();
    }
 public void Update()
 {
     //IL_002c: Unknown result type (might be due to invalid IL or missing references)
     //IL_003d: Unknown result type (might be due to invalid IL or missing references)
     //IL_0042: Unknown result type (might be due to invalid IL or missing references)
     //IL_0117: Unknown result type (might be due to invalid IL or missing references)
     //IL_011c: Expected O, but got Unknown
     //IL_019a: Unknown result type (might be due to invalid IL or missing references)
     //IL_019f: Expected O, but got Unknown
     //IL_01cf: Unknown result type (might be due to invalid IL or missing references)
     //IL_01e0: Unknown result type (might be due to invalid IL or missing references)
     if (!(animator == null))
     {
         bool flag = animator.IsInTransition(0);
         AnimatorStateInfo info = (!flag) ? animator.GetCurrentAnimatorStateInfo(0) : animator.GetNextAnimatorStateInfo(0);
         if ((curHash != info.get_fullPathHash() && !waitChange) || (curHash == info.get_fullPathHash() && waitChange))
         {
             if (waitChange)
             {
                 waitChange = false;
             }
             else
             {
                 if (curDatas != null && lastSpeed > 0f)
                 {
                     float num = Time.get_deltaTime() * lastSpeed + lastNormalizedTime;
                     Forward(num - beginTime + curMargin);
                 }
                 OnChangeAnim(info.get_fullPathHash(), false);
             }
             if (curDatas == null)
             {
                 return;
             }
             if (!flag)
             {
                 changeDelay      = true;
                 changeTransition = false;
                 return;
             }
             AnimatorClipInfo[] nextAnimatorClipInfo = animator.GetNextAnimatorClipInfo(0);
             if (nextAnimatorClipInfo.Length == 0)
             {
                 changeDelay      = true;
                 changeTransition = true;
                 return;
             }
             ChangeAnimClip(ref info, nextAnimatorClipInfo[0].get_clip());
         }
         else if (changeDelay)
         {
             AnimatorClipInfo[] array = (!changeTransition) ? animator.GetCurrentAnimatorClipInfo(0) : animator.GetNextAnimatorClipInfo(0);
             if (array.Length <= 0)
             {
                 return;
             }
             ChangeAnimClip(ref info, array[0].get_clip());
         }
         if (!waitChange && curDatas != null && (!flag || !((ValueType)animator.GetCurrentAnimatorStateInfo(0)).Equals((object)animator.GetNextAnimatorStateInfo(0))))
         {
             float num2 = info.get_normalizedTime() * curTimeScale;
             if (animator.get_speed() >= 0f)
             {
                 if (num2 >= lastTime && info.get_loop())
                 {
                     Forward(curLength);
                     beginTime = lastTime;
                     lastTime += curLength;
                     curTime   = 0f;
                     curIndex  = 0;
                 }
                 else if (lastNormalizedTime > num2)
                 {
                     ExecuteLastEvent(false);
                     beginTime = 0f;
                     lastTime  = curLength;
                     curTime   = 0f;
                     curIndex  = 0;
                 }
                 lastNormalizedTime = num2;
                 lastSpeed          = animator.get_speed();
                 Forward(num2 - beginTime + curMargin);
             }
         }
     }
 }