test commit

This commit is contained in:
niko
2026-10-11 20:26:48 +02:00
parent 4dbd3c0ab3
commit 6fee00e7ff
2187 changed files with 760371 additions and 2 deletions
+22
View File
@@ -0,0 +1,22 @@
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit.Locomotion.Movement;
public class PlayerFootsteps : MonoBehaviour
{
public ContinuousMoveProvider ContinuousMoveProvider;
public AudioSource AudioSource;
public float MaxVolume = 0.75f;
void Update()
{
if (!Player.Instance) return;
var input = ContinuousMoveProvider.leftHandMoveInput.ReadValue(); // fuck you, the actual game does it like this too.
if (Mathf.Abs(input.x) + Mathf.Abs(input.y) > 0.1f)
AudioSource.volume = Mathf.Lerp(AudioSource.volume, MaxVolume, Time.deltaTime * 20f);
else
AudioSource.volume = Mathf.Lerp(AudioSource.volume, 0, Time.deltaTime * 20f);
AudioSource.pitch = (Player.Instance.running) ? 1.5f : 1;
}
}