public AudioClip getSoundOfType(EAudioClipType soundType) { Pair pairSteps = getPairOfType(soundType); if (pairSteps != null) { return(pairSteps.getRandomSound()); } return(null); }
public Pair getPairOfType(EAudioClipType animation) { foreach (var pair in AudioClips) { if (pair.aniomationType == animation) { return(pair); } } Debug.LogWarning("The Animation pair for step was not defined in the scripteable object instance"); return(null); }