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