Ejemplo n.º 1
0
 public void StopPlay(string param)
 {
     isPlaying = false;
     EventDispatcher.Instance.Dispatch(GameEventConst.BGM_UP);
     if (queue.Count != 0)
     {
         PluginTool.Instance.isPlaying = true;
         ChatDate ch = queue.Dequeue();
         PluginTool.Instance.PlaySound(URL.localCachePath + ch.index + ".amr");
     }
 }
Ejemplo n.º 2
0
 public void AddMessage(string message, bool isAlignLeft)
 {
     if (message.Length > 0)
     {
         ChatDate msg = new ChatDate();
         msg.Message     = message;
         msg.IsAlignLeft = isAlignLeft;
         messages.Add(msg);
         UpdateTimeStamp();
     }
 }
Ejemplo n.º 3
0
    public void voiceChat(Table.VoiceChat chat)
    {
        PluginTool.Instance.WriteVoiceToFile(chat.data, chat.index);
        PluginTool.Instance.queue.Enqueue(new ChatDate(chat.index, chat.id));

        if (!PluginTool.Instance.isPlaying)
        {
            if (PluginTool.Instance.queue.Count != 0)
            {
                PluginTool.Instance.isPlaying = true;
                ChatDate ch = PluginTool.Instance.queue.Dequeue();
                PluginTool.Instance.PlaySound(URL.localCachePath + ch.index + ".amr");
            }
        }
    }
Ejemplo n.º 4
0
 public void IOS_PlaySound(string retcode)
 {
     //retcode=0代表成功,其他错误吗
     AddLog("IOS_PlaySound = " + retcode.ToString());
     if (retcode != "0")
     {
         Debug.LogError("IOS_PlaySound error " + retcode.ToString());
     }
     //回复音量
     isPlaying = false;
     EventDispatcher.Instance.Dispatch(GameEventConst.BGM_UP);
     if (queue.Count != 0)
     {
         PluginTool.Instance.isPlaying = true;
         ChatDate ch = queue.Dequeue();
         PluginTool.Instance.PlaySound(URL.localCachePath + ch.index + ".amr");
     }
 }