示例#1
0
 /// <summary>
 /// Get a random asset from the asset group
 /// </summary>
 /// <returns>The random asset</returns>
 public T GetRandom()
 {
     return(RandomExtensions.RandomElement(assets));
 }
示例#2
0
 /// <summary>
 /// Play a one shot audio clip on the provided audio source
 /// </summary>
 /// <param name="source">The audio source to play the one shot on</param>
 /// <returns>The audio clip that was played</returns>
 public AudioClip PlayRandomOneShot(AudioSource source)
 {
     return(RandomExtensions.PlayRandomOneShot(source, assets));
 }