Ejemplo n.º 1
0
    // Token: 0x0600107D RID: 4221
    public void UpdateDashing()
    {
        PlatformMovement platformMovement = this.m_sein.PlatformBehaviour.PlatformMovement;

        UI.Cameras.Current.ChaseTarget.CameraSpeedMultiplier.x = Mathf.Clamp01(this.m_stateCurrentTime / this.DashTime);
        float velocity = this.DashSpeedOverTime.Evaluate(this.m_stateCurrentTime);

        velocity *= 1.0f + .2f * RandomizerBonus.Velocity();
        if ((RandomizerBonus.GravitySuit() && Characters.Sein.Abilities.Swimming.IsSwimming))
        {
            Vector2 newSpeed = new Vector2(velocity, 0f);
            platformMovement.LocalSpeed = newSpeed.Rotate(this.m_sein.Abilities.Swimming.SwimAngle);
        }
        else
        {
            platformMovement.LocalSpeedX = (float)((!this.m_faceLeft) ? 1 : -1) * velocity;
        }
        this.m_sein.FaceLeft = this.m_faceLeft;
        if (this.AgainstWall())
        {
            platformMovement.LocalSpeed = Vector2.zero;
        }
        this.SpriteRotation = Mathf.Lerp(this.SpriteRotation, this.m_sein.PlatformBehaviour.PlatformMovement.GroundAngle, 0.2f);
        if (this.m_sein.IsOnGround)
        {
            if (Core.Input.Horizontal > 0f && this.m_faceLeft)
            {
                this.StopDashing();
            }
            if (Core.Input.Horizontal < 0f && !this.m_faceLeft)
            {
                this.StopDashing();
            }
        }
        if (this.m_stateCurrentTime > this.DashTime)
        {
            if (platformMovement.IsOnGround && Core.Input.Horizontal == 0f)
            {
                platformMovement.LocalSpeedX = 0f;
            }
            this.ChangeState(SeinDashAttack.State.Normal);
        }
        if (Core.Input.Jump.OnPressed || Core.Input.Glide.OnPressed)
        {
            platformMovement.LocalSpeedX = ((!this.m_faceLeft) ? this.OffGroundSpeed : (-this.OffGroundSpeed));
            this.m_sein.PlatformBehaviour.AirNoDeceleration.NoDeceleration = this.m_allowNoDecelerationForThisDash;
            this.m_stopAnimation = true;
            this.ChangeState(SeinDashAttack.State.Normal);
            this.m_timeWhenDashJumpHappened = Time.time;
        }
        if (this.RaycastTest() && this.m_isOnGround)
        {
            this.StickOntoGround();
            return;
        }
        this.m_isOnGround = false;
    }
Ejemplo n.º 2
0
    // Token: 0x0600107B RID: 4219
    public void UpdateNormal()
    {
        float num = Time.time - this.m_lastPressTime;

        if (this.m_sein.IsOnGround || (RandomizerBonus.GravitySuit() && Characters.Sein.Abilities.Swimming.IsSwimming))
        {
            this.m_hasDashed = false;
            RandomizerBonus.DoubleAirDashUsed = false;
        }
        if (Core.Input.Glide.Pressed && this.m_timeWhenDashJumpHappened + 5f > Time.time)
        {
            this.m_timeWhenDashJumpHappened = 0f;
            PlatformMovement platformMovement = this.m_sein.PlatformBehaviour.PlatformMovement;
            float            num2             = this.OffGroundSpeed - 2f;
            if (Mathf.Abs(platformMovement.LocalSpeedX) > num2)
            {
                platformMovement.LocalSpeedX = Mathf.Sign(platformMovement.LocalSpeedX) * num2;
            }
        }
        IChargeDashAttackable target;

        if (this.CanChargeDash())
        {
            target = this.FindClosestAttackable;
        }
        else
        {
            target = null;
        }
        this.UpdateTargetHighlight(target);
        if (Core.Input.RightShoulder.Pressed && num < 0.15f)
        {
            if (this.CanChargeDash())
            {
                if (this.HasEnoughEnergy)
                {
                    this.SpendEnergy();
                    this.PerformChargeDash();
                    return;
                }
                this.ShowNotEnoughEnergy();
                this.m_lastPressTime = 0f;
                return;
            }
            else
            {
                if (this.CanPerformNormalDash())
                {
                    this.PerformDash();
                    return;
                }
                if (this.CanWallDash())
                {
                    this.PerformWallDash();
                    return;
                }
                if (this.CanPerformDashIntoWall())
                {
                    this.PerformDashIntoWall();
                }
            }
        }
    }
Ejemplo n.º 3
0
 // Token: 0x06001077 RID: 4215
 public bool CanPerformNormalDash()
 {
     return((this.HasAirDashSkill() || this.m_sein.IsOnGround || (RandomizerBonus.GravitySuit() && Characters.Sein.Abilities.Swimming.IsSwimming)) && !this.AgainstWall() && this.DashHasCooledDown && !this.m_hasDashed);
 }