Exemplo n.º 1
0
        public override void Play(params int[] audioIds)
        {
            int audioId = 0;

            if (audioIds != null && audioIds.Length > 0)
            {
                audioId = audioIds[0];
            }
            AudioActionType ptype       = base.getAudioType(audioId);
            AudioActionBase audioAction = null;

            audioAction = base.NewAudio(ptype, audioId, OnStartCall, OnEndCall);
            if (m_NowPlayAudio != null)
            {
                this.m_WaitPlayAudio = audioAction;
                m_NowPlayAudio.Stop();
            }
            else
            {
                this.m_NowPlayAudio = audioAction;
                this.m_NowPlayAudio.Play();
            }
        }
Exemplo n.º 2
0
 public override void Stop(int stopType = 0)
 {
     if (m_AudioQueue != null)
     {
         m_IsStop = true;
         AudioActionBase action = null;
         while ((action = DequeueAudio()) != null)
         {
             if (action != null && action.GetAudioSource() != null)
             {
                 action.Stop();
             }
         }
     }
     this.Destroy();
 }