private void GetInput(out float speed)
{
// Read input
float horizontal = CrossPlatformInputManager.GetAxisRaw("Horizontal"); //AMCLEAN changed GetAxis to GetAxisRaw
float vertical = CrossPlatformInputManager.GetAxisRaw("Vertical"); //AMCLEAN changed GetAxis to GetAxisRaw
bool waswalking = _isWalking;
#if !MOBILE_INPUT
// On standalone builds, walk/run speed is modified by a key press.
// keep track of whether or not the character is walking or running
_isWalking = !Input.GetKey(KeyCode.LeftShift);
#endif
// set the desired speed to be walking or running
//speed = _isWalking ? walkSpeed : runSpeed;
speed = PlayerPrefs.GetFloat("MoveSpeed") * 10;
_input = new Vector2(horizontal, vertical);
// normalize input if it exceeds 1 in combined length:
if (_input.sqrMagnitude > 1)
{
_input.Normalize();
}
// handle speed change to give an fov kick
// only if the player is going to a run, is running and the fovkick is to be used
if (_isWalking != waswalking && useFOVKick && _characterController.velocity.sqrMagnitude > 0)
{
StopAllCoroutines();
StartCoroutine(!_isWalking ? _fovKick.FOVKickUp() : _fovKick.FOVKickDown());
}
}