예제 #1
0
    public static void PlayCallAudioTrack(CallTrack call)
    {
        if (call == CallTrack.None)
        {
            return;
        }

        _instance.PlayAudioTrack(call);
    }
예제 #2
0
    public static void UnlockCallAudioTrack(CallTrack call)
    {
        if (call == CallTrack.None)
        {
            return;
        }

        if (OnCallUnlocked != null)
        {
            OnCallUnlocked(call);
        }
    }
예제 #3
0
    public void PlayAudioTrack(CallTrack track)
    {
        if (_audioClips.ContainsKey(track))
        {
            _playingClip     = track;
            _callSource.clip = _audioClips[track];
            _callSource.Play();

            if (OnCallStarted != null)
            {
                OnCallStarted(track);
            }
        }
    }
예제 #4
0
 private void Update()
 {
     if (_playingClip != CallTrack.None)
     {
         if (!_callSource.isPlaying)
         {
             if (OnCallEnded != null)
             {
                 OnCallEnded(_playingClip);
             }
             _playingClip = CallTrack.None;
         }
     }
 }