Ejemplo n.º 1
0
    void AdjustSpeed()
    {
        m_Animator.SetBool("Walking", false);
        m_Animator.SetBool("Sprinting", false);

        if (MoveState == EMoveState.IDLE)
        {
            m_AIMovement.AdjustSpeed(0);
        }
        else if (MoveState == EMoveState.WALKING)
        {
            m_Animator.SetBool("Walking", true);
            m_AIMovement.AdjustSpeed(walkSpeed);
        }
        else if (MoveState == EMoveState.RUNNING)
        {
            m_AIMovement.AdjustSpeed(runSpeed);
        }
        else
        {
            m_AIMovement.AdjustSpeed(sprintSpeed);
            m_Animator.SetBool("Sprinting", true);
        }
    }