jumpland tweaks

This commit is contained in:
2022-04-24 15:21:24 +03:00
parent 45eec4e180
commit ad5ed57c3a

View File

@@ -979,12 +979,19 @@ namespace Game
if (!landing)
lastLanded = -1; // Reset so double jumps have double sounds
float volume = 0.8f;
float volume1 = 0.8f;
float volume2 = volume1;
Vector2 pitchRange = new Vector2(0.9f, 1.05f);
Vector2 secondStepDelayRange = new Vector2(0.031f, 0.067f);
Vector2 secondStepDelayRange = new Vector2(0.031f, 0.059f);
AudioManager.PlaySound("jumpland", Actor, 0, AudioFlags.None, rootActor.Position, volume , pitchRange);
AudioManager.PlaySoundDelayed(secondStepDelayRange, "jumpland", Actor, 0, rootActor.Position, volume, pitchRange);
if (landing)
volume2 *= 0.6f;
else
volume1 *= 0.6f;
AudioManager.PlaySound("jumpland", Actor, 0, AudioFlags.None, rootActor.Position, volume1, pitchRange);
if (landing)
AudioManager.PlaySoundDelayed(secondStepDelayRange, "jumpland", Actor, 0, rootActor.Position, volume2, pitchRange);
}
private static void ApplyFriction(ref Vector3 velocity)