/// <summary> /// Plays the audio clip with the given name /// </summary> /// <param name="name">name of the audio clip to play</param> public static void Play(Soundname name) { audioSource1.clip = audioClips1[name]; audioSource1.Play(); }
/// <summary> /// Plays the audio clip with the given name /// </summary> /// <param name="name">name of the audio clip to play</param> public static void Play(Soundname name) { audioSource.PlayOneShot(audioClips[name]); }