コード例 #1
0
    public AudioClip getSoundOfType(EAudioClipType soundType)
    {
        Pair pairSteps = getPairOfType(soundType);

        if (pairSteps != null)
        {
            return(pairSteps.getRandomSound());
        }
        return(null);
    }
コード例 #2
0
 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);
 }