void FixedUpdate()
{
tempTime += Time.deltaTime;
FootSound.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(gameObject));
PlayerLook();
PlayerMoveing();
Jump();
if (Input.GetAxis("Vertical") >= 0.01f || Input.GetAxis("Horizontal") >= 0.01f || Input.GetAxis("Vertical") <= -0.01f || Input.GetAxis("Horizontal") <= -0.01f)
{
if (rg.isGrounded == true)
{
isMoving = true;
}
else if (rg.isGrounded == false)
{
isMoving = false;
}
}
else if (Input.GetAxis("Vertical") == 0 || Input.GetAxis("Horizontal") == 0)
{
isMoving = false;
}
if (Input.GetButton("Fire3"))
{
if (tempTime >= 0.4f)
{
tempTime -= 0.4f;
FootPlay();
}
}
if (tempTime >= 0.6f)
{
tempTime -= 0.6f;
FootPlay();
}
if (isJumping && rg.isGrounded)
{
FootSound.setPitch(2);
FootSound.start();
isJumping = false;
FootSound.setPitch(1);
}
}