12345678910111213141516171819202122232425262728293031323334353637 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using WebTools.SoundSystem.Datas;
- namespace WebTools.SoundSystem.Behaviours
- {
- public class PickUpClip : MonoBehaviour
- {
- public AudioClip audioClip;
- public SoundTypes.TypeAudio typeAudio;
- private void OnMouseDown()
- {
- if (audioClip != null)
- {
- switch (typeAudio)
- {
- case SoundTypes.TypeAudio.FX:
- SoundManager.Instance.FXAudioPlay(audioClip);
- break;
- case SoundTypes.TypeAudio.Ambient:
- SoundManager.Instance.AmbientAudioPlay(audioClip);
- break;
- case SoundTypes.TypeAudio.UI:
- SoundManager.Instance.UIAudioPlay(audioClip);
- break;
- case SoundTypes.TypeAudio.Music:
- SoundManager.Instance.MusicAudioPlay(audioClip);
- break;
- }
- }
- }
- }
- }
|