I just learned how to implement a Sound Manager and put sounds into it. The problem is, I'm making a platformer and I have a player, and two different types of enemies who all have footstep sounds. The main issue is that I'm playing all the sounds from the same sound manager and I made the footstep sounds of the player to play like this:
public void PlayMoveSound()
{
if(audioSrc.isPlaying == false)
{
randomMoveSound = Random.Range(0,5);
audioSrc.PlayOneShot(moveSounds[randomMoveSound]);
}
}
I don't know how else to make it NOT sound like its playing 100 times per second so I did this. This gave birth to the issue that the looping audio which is the player's movement sound now blocks me from doing the same thing for the other characters' footstep sounds since it uses the same "audioSrc" AudioSource. Any hints on how different I can create a system for semi-looping audio?