/// <summary> /// 发送聊天信息 房间 /// </summary> /// <param name="successAction"></param> /// <param name="failedAction"></param> public static void NotifyServerRoomChatMessage(string message, Action successAction, Action failedAction) { #if UNITY_EDITOR if (StaticData.IsUsedLocalDataNotServer) { successAction?.Invoke(); return; } #endif CSChannelChat cSChannelChat = new CSChannelChat(); cSChannelChat.Message = message; ProtocalManager.Instance().SendCSChannelChat(cSChannelChat, (SCEmtpyChannelChat sCEmtpyChannelChat) => { Debug.Log("发送聊天信息成功!"); successAction?.Invoke(); }, (ErrorInfo er) => { Debug.Log("通知服务器发送聊天信息:" + er.ErrorMessage); failedAction?.Invoke(); }); }
public void SendCSChannelChat(CSChannelChat cschannelchat, Action <SCEmtpyChannelChat> ResponseSCEmtpyChannelChatCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true) { OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSChannelChat> (); ProtoSendMethod.BusinessRequest <SCEmtpyChannelChat>(cschannelchat, opCodeType, ResponseSCEmtpyChannelChatCallBack, errorCallBack, isShowDefaultTip); }