Exemplo n.º 1
0
        public void PlayOneAudio(int audioId)
        {
            AudioActionType ptype       = base.getAudioType(audioId);
            AudioActionBase audioAction = null;
            Action <int>    startCall   = delegate(int aid)
            {
                OnStartCall(aid, audioAction);
            };

            audioAction = base.NewAudio(ptype, audioId, startCall, OnEndCall);
            audioAction.Play();
        }
Exemplo n.º 2
0
 private void OnEndCall(int audioGuid)
 {
     if (!m_IsStop)
     {
         DequeueAudio();
     }
     MsgDispatcher.SendMessage(GlobalEventType.AudioPlayEnd, audioGuid);
     if (!m_IsStop)
     {
         AudioActionBase nextAction = PeekAudio();
         if (nextAction != null)
         {
             nextAction.Play();
         }
     }
 }
Exemplo n.º 3
0
        public void PlayOneAudio(int audioId)
        {
            AudioActionType ptype = base.getAudioType(audioId);

            if (ptype == AudioActionType.Loop)
            {
                ptype = AudioActionType.Once;
            }

            AudioActionBase audioAction = null;

            audioAction = base.NewAudio(ptype, audioId, OnStartCall, OnEndCall);
            if (IsCanPlay())
            {
                audioAction.Play();
            }
            EnqueueAudio(audioAction);
        }