// Start is called before the first frame update async void Start() { AudioSource audioSource = gameObject.AddComponent <AudioSource>(); AudioClipController controller = new AudioClipController(); await controller.LoadAudioClipWithWebRequest(TEST_EFFECT_PATH, AudioType.WAV); controller.SetFadeOutCurve(); audioSource.clip = controller.GetAudioClip(); audioSource.Play(); }
public override void PlaySound() { audioSource.PlayOneShot(clipController.GetAudioClip()); }
public AudioClip GetAudioClip() { return(clipController.GetAudioClip()); }
public virtual void SetAudioClip(AudioClipController controller) { audioSource.clip = controller.GetAudioClip(); }