diff --git a/xiaofang/Assets/ProtoBuf/test.cs b/xiaofang/Assets/ProtoBuf/test.cs index 9a36acea..67331ea7 100644 --- a/xiaofang/Assets/ProtoBuf/test.cs +++ b/xiaofang/Assets/ProtoBuf/test.cs @@ -229,9 +229,9 @@ public class test : MonoBehaviour // wEBScriptListener.SendMessageByte(sendData); //} - - //开始计时 + + //11.开始计时 void RoomStartTime() { JoinRoomRequest data = new JoinRoomRequest(); @@ -325,9 +325,28 @@ public class test : MonoBehaviour wEBScriptListener.SendMessageByte(sendData); } + //12.消息转发 + public void MessageToUser() + { + MessageBroadcastRequest data = new MessageBroadcastRequest(); + data.RoomId = "168888"; + data.Type = 1; + data.RoleId = "8002"; + data.Cmd = "55"; + WSMessage msg = new WSMessage(); + msg.Module = "hall"; + msg.ServiceName = "MessageToUser"; + msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); + byte[] sendData = ProtoBufffer.Serialize(msg); + WSMessage deinfo = ProtoBufffer.DeSerialize(sendData); + MessageBroadcastRequest login = ProtoBufffer.DeSerialize(deinfo.Data.ToByteArray()); + Debug.Log("==========消息转发函数调用"); + //BroadcastFrameMsg.FramesFieldNumber + wEBScriptListener.SendMessageByte(sendData); + } - + // Start is called before the first frame update @@ -536,6 +555,12 @@ public class test : MonoBehaviour break; + case "task.InitStart": + + + break; + + //任务触发 case "task.TaskTrigger": Debug.Log("-----------task.TaskTrigger"); diff --git a/xiaofang/Assets/UnityCommon b/xiaofang/Assets/UnityCommon index 0385375c..2e42b278 160000 --- a/xiaofang/Assets/UnityCommon +++ b/xiaofang/Assets/UnityCommon @@ -1 +1 @@ -Subproject commit 0385375c1818fc57f42407a6c5301a26ded3a19a +Subproject commit 2e42b278d4c6ac9e045925dcc6e04896a19cbfd8