public void PlayFootFallSound(FootStepObject footStepObject, bool spawnParticle = true, bool spawnStepMark = true, float volume = 1f) { for (int i = 0; i < customSurfaces.Count; i++) { if (customSurfaces[i] != null && ContainsTexture(footStepObject.name, customSurfaces[i])) { customSurfaces[i].PlayRandomClip(footStepObject, spawnParticle, spawnStepMark, volume); return; } } if (defaultSurface != null) { defaultSurface.PlayRandomClip(footStepObject, spawnParticle, spawnStepMark, volume); } }
public void PlayFootFallSound(FootStepObject footStepObject) { for (int i = 0; i < customSurfaces.Count; i++) { if (customSurfaces[i] != null && ContainsTexture(footStepObject.name, customSurfaces[i])) { customSurfaces[i].PlayRandomClip(footStepObject); return; } } if (defaultSurface != null) { defaultSurface.PlayRandomClip(footStepObject); } }