Add options menu and sound volume options logic

This commit is contained in:
BuyMyMojo 2023-03-04 04:53:44 +11:00
parent dfed2cc0e4
commit 91482820da
5 changed files with 1384 additions and 12 deletions

View file

@ -172,10 +172,14 @@ public class Player : MonoBehaviour, IKitchenObjectParent
// set isWalking to true if moveDir is not (0,0,0)
isWalking = moveDir != Vector3.zero;
float rotateSpeed = 10f;
// smothly rotate towards moveDir with a Slerp smoothed operation.
// Slerp is for like rotations while Lerp is for positions
transform.forward = Vector3.Slerp(transform.forward, moveDir, Time.deltaTime * rotateSpeed);
if (isWalking)
{
float rotateSpeed = 10f;
// smothly rotate towards moveDir with a Slerp smoothed operation.
// Slerp is for like rotations while Lerp is for positions
transform.forward = Vector3.Slerp(transform.forward, moveDir, Time.deltaTime * rotateSpeed);
}
}
private void SetSelectedCounter(BaseCounter selectedCounter)