浏览代码

[Bot] Automated dotnet-format update

/devlogs-4-addressable-assets
Ciro Continisio 4 年前
当前提交
56af60b8
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 5
      UOP1_Project/Assets/Scripts/Characters/Protagonist.cs

5
UOP1_Project/Assets/Scripts/Characters/Protagonist.cs


}
//Fix to avoid getting a Vector3.zero vector, which would result in the player turning to x:0, z:0
if(_inputVector.sqrMagnitude == 0f)
if (_inputVector.sqrMagnitude == 0f)
adjustedMovement = transform.forward * (adjustedMovement.magnitude + .01f);
//Accelerate/decelerate

if(targetSpeed > 0f && isRunning) targetSpeed = 1f;
if (targetSpeed > 0f && isRunning)
targetSpeed = 1f;
targetSpeed = Mathf.Lerp(_previousSpeed, targetSpeed, Time.deltaTime * 4f);
movementInput = adjustedMovement.normalized * targetSpeed;

正在加载...
取消
保存