public float GetPlaybackTime(SoundClipSO sound)
 {
     return(_playbackTimeDic.ContainsKey(sound)
         ? _playbackTimeDic[sound]
         : 0f);
 }
 public void PlaySoundOneShot(SoundClipSO sound)
 {
     sound.PlayOneShot(_audioSource);
 }
예제 #3
0
 public void PlayMusic(SoundClipSO soundSO)
 {
     _sounds.PlaySound(soundSO);
 }
 public void PlaySound(SoundClipSO sound)
 {
     SaveCurrentPlaybackTime();
     sound.Play(_audioSource, GetPlaybackTime(sound));
     _currentClip = sound;
 }
예제 #5
0
 private void OnEnable()
 {
     _soundClipSO = (SoundClipSO)target;
 }