Esempio n. 1
0
 // Token: 0x06000675 RID: 1653 RVA: 0x0006B688 File Offset: 0x00069888
 private void Update()
 {
     if (base.gameObject == null || this.mIsDestroying)
     {
         return;
     }
     if (this._Active)
     {
         Animation eelAnim = this._EelAnim;
         if (!this.mPlayedPartForGoingAbove && this.MultiplyVectors(this.mEelTransform.position, Vector3.up) > this.MultiplyVectors(this._WaterHeightMarker.transform.position, Vector3.up))
         {
             this.PlaySplashEffects();
             eelAnim.CrossFade(this._LaunchAnimName, 0.3f);
             eelAnim[this._LaunchAnimName].wrapMode = WrapMode.Once;
             this.mPlayedPartForGoingAbove          = true;
         }
         if (this.mPlayedPartForGoingAbove && !this.mPlayedPartForGoingBelow)
         {
             if (!this.mIdleAnimationPlayed && eelAnim.IsPlaying(this._LaunchAnimName) && eelAnim[this._LaunchAnimName].time + this._LauchCrossFadeTime > eelAnim[this._LaunchAnimName].length)
             {
                 this.mIdleAnimationPlayed = true;
                 eelAnim.CrossFade(this._IdleAnimName, this._LauchCrossFadeTime);
                 eelAnim[this._IdleAnimName].wrapMode = WrapMode.Loop;
             }
             if (this.MultiplyVectors(this.mEelTransform.position, Vector3.up) < this.MultiplyVectors(this._WaterHeightMarker.transform.position, Vector3.up))
             {
                 this.PlaySplashEffects();
                 this.mPlayedPartForGoingBelow = true;
             }
         }
         if (this.mLamdaPosition < 1f)
         {
             this.mEelTransform.rotation = Quaternion.Lerp(this.mRotFrom, this.mRotTo, this.mLamdaPosition);
             this.mEelTransform.position = EREel.DoBezier(this._StartPoint.position, this.mControlPoint, this._EndPoint.position, this.mLamdaPosition);
             if (this.mLamdaPosition > 0.5f && this.mDelayTime < this._DelayOnTop)
             {
                 this.mDelayTime += Time.deltaTime;
             }
             else
             {
                 this.mLamdaPosition += this._Speed * Time.deltaTime;
             }
             if (this.mLamdaPosition >= 1f)
             {
                 this.StartJumpIntervalTimer();
                 this._EelTargetable._Active   = false;
                 this._DragonFiringCSM.enabled = false;
             }
         }
         if (this.mStartTimer)
         {
             this.mJumpTimer -= Time.deltaTime;
             if (this.mJumpTimer < 0f)
             {
                 this.MakeAJump();
             }
         }
     }
 }
Esempio n. 2
0
 // Token: 0x06000678 RID: 1656 RVA: 0x0006B95C File Offset: 0x00069B5C
 private void MakeAJump()
 {
     this._TopPoint     = (this._StartPoint.position + this._EndPoint.position) / 2f + this._StartPoint.up * UnityEngine.Random.Range(this._MinHeight, this._MaxHeight);
     this.mControlPoint = EREel.DoBezierReverse(this._StartPoint.position, this._TopPoint, this._EndPoint.position);
     this.mStartTimer   = (this.mPlayedPartForGoingAbove = (this.mPlayedPartForGoingBelow = (this.mIdleAnimationPlayed = false)));
     this.mEelTransform.LookAt(this._TopPoint);
     this.mDelayTime               = (this.mLamdaPosition = 0f);
     this._EelTargetable._Active   = true;
     this._DragonFiringCSM.enabled = true;
 }