Пример #1
0
    private IEnumerator DoOpen(Transform effect, Animator animator, bool reverse, float endTime, Action onComplete)
    {
        if (reverse)
        {
            road.get_material().SetFloat("_Reverse", 1f);
        }
        while (true)
        {
            yield return((object)null);

            AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0);
            float             t = currentAnimatorStateInfo.get_normalizedTime();
            if (t > endTime)
            {
                break;
            }
            road.get_material().SetTextureOffset("_AlphaTex", new Vector2(1f - t, 0f));
        }
        animator.set_enabled(false);
        onComplete?.Invoke();
        float timer = 0f;

        while (true)
        {
            yield return((object)null);

            timer += Time.get_deltaTime();
            if (timer > endTime)
            {
                break;
            }
            road.get_material().SetTextureOffset("_AlphaTex", new Vector2(1f - (timer + endTime), 0f));
        }
    }
    private void FuncDelete()
    {
        //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)
        switch (m_state)
        {
        case 1:
            if (m_effectDeleteAnimator == null)
            {
                ForwardState();
            }
            else
            {
                AnimatorStateInfo currentAnimatorStateInfo = m_effectDeleteAnimator.GetCurrentAnimatorStateInfo(0);
                if (currentAnimatorStateInfo.get_normalizedTime() >= 1f)
                {
                    ForwardState();
                }
            }
            break;

        case 2:
            Destroy();
            ForwardState();
            break;
        }
    }
Пример #3
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;
            }
        }
    }
    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());
            }
        }
    }
Пример #5
0
 public void AnimEnd()
 {
     //IL_007f: 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)
     if (!IsDeleted && m_isAtkEnd)
     {
         bool flag  = true;
         int  count = m_laserAttackList.Count;
         if (IsAnimEnd)
         {
             for (int i = 0; i < count; i++)
             {
                 if (m_laserAttackList[i] != null && m_laserAttackList[i].m_effectAnimator != null)
                 {
                     Animator          effectAnimator           = m_laserAttackList[i].m_effectAnimator;
                     AnimatorStateInfo currentAnimatorStateInfo = effectAnimator.GetCurrentAnimatorStateInfo(0);
                     if (currentAnimatorStateInfo.get_normalizedTime() < 1f)
                     {
                         flag = false;
                     }
                 }
             }
         }
         else
         {
             for (int j = 0; j < count; j++)
             {
                 if (m_laserAttackList[j] != null)
                 {
                     if (m_laserAttackList[j].m_capCollider != null)
                     {
                         Object.Destroy(m_laserAttackList[j].m_capCollider);
                         m_laserAttackList[j].m_capCollider = null;
                     }
                     if (m_laserAttackList[j].m_effectAnimator != null)
                     {
                         Animator effectAnimator2 = m_laserAttackList[j].m_effectAnimator;
                         effectAnimator2.Play("END");
                         flag = false;
                     }
                 }
             }
             IsAnimEnd = true;
         }
         if (flag)
         {
             Destroy();
         }
     }
 }
    private void FuncDelete()
    {
        //IL_001e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0023: Unknown result type (might be due to invalid IL or missing references)
        if (m_effectAnimator == null)
        {
            Destroy();
        }
        AnimatorStateInfo currentAnimatorStateInfo = m_effectAnimator.GetCurrentAnimatorStateInfo(0);

        if (currentAnimatorStateInfo.get_normalizedTime() >= 1f)
        {
            Destroy();
        }
    }
    protected virtual IEnumerator DoSit()
    {
        isPlayingSitAnimation = true;
        chairPoint.SetSittingCharacter(this);
        Vector3 sitPos = chairPoint.get_transform().get_position();

        while (true)
        {
            animCtrl.Play(PLCA.WALK, false);
            Vector3    pos          = base._transform.get_position();
            Vector3    diff         = sitPos - pos;
            Vector2    val          = diff.ToVector2XZ();
            Vector2    dir          = val.get_normalized();
            Quaternion val2         = Quaternion.LookRotation(dir.ToVector3XZ());
            Vector3    eulerAngles  = val2.get_eulerAngles();
            float      rot2         = eulerAngles.y;
            float      vel          = 0f;
            Vector3    eulerAngles2 = base._transform.get_eulerAngles();
            rot2 = Mathf.SmoothDampAngle(eulerAngles2.y, rot2, ref vel, 0.1f);
            base._transform.set_eulerAngles(new Vector3(0f, rot2, 0f));
            if (diff.get_magnitude() < 0.15f)
            {
                break;
            }
            yield return((object)null);
        }
        Vector3    dirPoint = chairPoint.dir.get_transform().get_position();
        Vector3    sitDir   = dirPoint - sitPos;
        Quaternion sitRot   = Quaternion.LookRotation(sitDir);

        base._transform.set_rotation(sitRot);
        PLCA sitMotion = (sexType != 0) ? PLCA.SIT_F : PLCA.SIT;

        animCtrl.Play(sitMotion, false);
        while (true)
        {
            AnimatorStateInfo currentAnimatorStateInfo = animCtrl.animator.GetCurrentAnimatorStateInfo(0);
            if (!(1f > currentAnimatorStateInfo.get_normalizedTime()))
            {
                break;
            }
            yield return((object)null);
        }
        isPlayingSitAnimation = false;
    }
Пример #8
0
    private void UpdateCamera()
    {
        //IL_0007: Unknown result type (might be due to invalid IL or missing references)
        //IL_000c: Unknown result type (might be due to invalid IL or missing references)
        //IL_00bd: Unknown result type (might be due to invalid IL or missing references)
        //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
        //IL_0106: Unknown result type (might be due to invalid IL or missing references)
        //IL_011c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0121: Unknown result type (might be due to invalid IL or missing references)
        AnimatorStateInfo currentAnimatorStateInfo = cameraAnimator.GetCurrentAnimatorStateInfo(0);

        if (currentAnimatorStateInfo.get_normalizedTime() >= 1f)
        {
            cutNo++;
            if (cameraAnimator.HasState(0, CUT_STATE_HASH[cutNo]))
            {
                cameraAnimator.Play(CUT_STATE_HASH[cutNo]);
            }
            else if (cameraAnimator.HasState(0, ENDING_STATE_ID))
            {
                cameraAnimator.Play(ENDING_STATE_ID);
                EndCutScene();
            }
            else
            {
                EndCutScene();
            }
        }
        int num = cutNo % 2;

        for (int i = 0; i < cameras.Length; i++)
        {
            cameras[i].camera.get_gameObject().SetActive(num == i);
        }
        CutSceneCamera activeCamera = GetActiveCamera();

        activeCamera.transform.set_position(cameraAnimatorTransform.get_position());
        activeCamera.transform.set_rotation(cameraAnimatorTransform.get_rotation());
        Camera  camera     = activeCamera.camera;
        Vector3 localScale = cameraAnimatorTransform.get_localScale();

        camera.set_fieldOfView(localScale.x);
    }
Пример #9
0
 private void Update()
 {
     //IL_00ce: Unknown result type (might be due to invalid IL or missing references)
     //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
     if (!loop || loopEnd)
     {
         if (waitTime > 0f)
         {
             timer += Time.get_deltaTime();
             if (timer < waitTime)
             {
                 return;
             }
         }
         if (waitParticlePlaying)
         {
             int i = 0;
             for (int num = particles.Length; i < num; i++)
             {
                 ParticleSystem val = particles[i];
                 if (val != null && val.get_isPlaying())
                 {
                     val.Stop(true);
                     return;
                 }
             }
         }
         if (waitAnimationPlaying && animator != null)
         {
             if (animator.IsInTransition(0))
             {
                 return;
             }
             AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0);
             if (!currentAnimatorStateInfo.get_loop() && currentAnimatorStateInfo.get_normalizedTime() < 1f)
             {
                 return;
             }
         }
         DestroyGameObject();
     }
 }
    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;
            }
        }
    }
Пример #11
0
    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();
    }
Пример #12
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();
                 }
             }
         }
     }
 }
 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);
             }
         }
     }
 }