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