Compare commits

..

No commits in common. "56eadbac93bbceff68e50a87df97c7179de4996d" and "e88882a908813c72ddb29f97357fde387135ace3" have entirely different histories.

View File

@ -251,14 +251,12 @@ public class test : MonoBehaviour
} }
//ÍÆËÍnpcºÍÍæ¼ÒµÄÐÅÏ¢ //ÍÆËÍnpcºÍÍæ¼ÒµÄÐÅÏ¢
void Location(string userId = "2",string roomId = "3") void Location(string userId = "2",string roomId = "3",NpcData npcData = null)
{ {
MoveResponse data = new MoveResponse(); MoveResponse data = new MoveResponse();
data.RoomId = roomId; data.RoomId = roomId;
data.UserId = userId; data.UserId = userId;
WSMessage msg = new WSMessage(); WSMessage msg = new WSMessage();
msg.Module = "move"; msg.Module = "move";
msg.ServiceName = "Location"; msg.ServiceName = "Location";
@ -466,55 +464,6 @@ public class test : MonoBehaviour
wEBScriptListener.SendMessageByte(sendData); wEBScriptListener.SendMessageByte(sendData);
} }
//
public void GetTaskList(string userID,string roomID)
{
TaskTrigger data = new TaskTrigger();
data.UserId = "2";
data.RoomId = "3";
WSMessage msg = new WSMessage();
msg.Module = "select";
msg.ServiceName = "GetSelectHistoryList";
msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data));
byte[] sendData = ProtoBufffer.Serialize(msg);
WSMessage deinfo = ProtoBufffer.DeSerialize<WSMessage>(sendData);
TaskTrigger login = ProtoBufffer.DeSerialize<TaskTrigger>(deinfo.Data.ToByteArray());
Debug.Log("==========消息转发函数调用");
//BroadcastFrameMsg.FramesFieldNumber
wEBScriptListener.SendMessageByte(sendData);
}
public void TriggerNpcArrive()
{
MoveRoomAoiRequest data = new MoveRoomAoiRequest();
data.RoomId = "1";
data.UserId = 2;
data.X = 3f;
data.Y = 4f;
data.Z = 5f;
data.SceneId = "6";
data.NpcId = "7";
data.Action = 8;
WSMessage msg = new WSMessage();
msg.Module = "select";
msg.ServiceName = "GetSelectHistoryList";
msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data));
byte[] sendData = ProtoBufffer.Serialize(msg);
WSMessage deinfo = ProtoBufffer.DeSerialize<WSMessage>(sendData);
MoveRoomAoiRequest login = ProtoBufffer.DeSerialize<MoveRoomAoiRequest>(deinfo.Data.ToByteArray());
Debug.Log("==========消息转发函数调用");
//BroadcastFrameMsg.FramesFieldNumber
wEBScriptListener.SendMessageByte(sendData);
}
// Start is called before the first frame update // Start is called before the first frame update
async void Start() async void Start()
@ -745,7 +694,7 @@ public class test : MonoBehaviour
break; break;
//13(1)任务触发 //任务触发
case "task.TaskTrigger": case "task.TaskTrigger":
Debug.Log("-----------task.TaskTrigger"); Debug.Log("-----------task.TaskTrigger");
TaskTrigger taskTrigger = ProtoBufffer.DeSerialize<TaskTrigger>(bytes); TaskTrigger taskTrigger = ProtoBufffer.DeSerialize<TaskTrigger>(bytes);
@ -753,7 +702,7 @@ public class test : MonoBehaviour
break; break;
//13(2)更新任务 //更新任务
case "task.UpdateTask": case "task.UpdateTask":
Debug.Log("-----------task.TaskTrigger"); Debug.Log("-----------task.TaskTrigger");
MoveRequest taskUpdateRequest = ProtoBufffer.DeSerialize<MoveRequest>(bytes); MoveRequest taskUpdateRequest = ProtoBufffer.DeSerialize<MoveRequest>(bytes);
@ -776,7 +725,7 @@ public class test : MonoBehaviour
break; break;
//17.语音频道 //语音频道
case "voice.RtcTokenHandler": case "voice.RtcTokenHandler":
Debug.Log("-----------move.MoveNpc"); Debug.Log("-----------move.MoveNpc");
VoiceResponse voiceResponse = ProtoBufffer.DeSerialize<VoiceResponse>(bytes); VoiceResponse voiceResponse = ProtoBufffer.DeSerialize<VoiceResponse>(bytes);
@ -784,7 +733,7 @@ public class test : MonoBehaviour
break; break;
//15.对象触发操作 //对象触发操作
case "hall.ThatUser": case "hall.ThatUser":
Debug.Log("-----------move.MoveNpc"); Debug.Log("-----------move.MoveNpc");
PlayerJoinResponse PlayerJoinResponse = ProtoBufffer.DeSerialize<PlayerJoinResponse>(bytes); PlayerJoinResponse PlayerJoinResponse = ProtoBufffer.DeSerialize<PlayerJoinResponse>(bytes);
@ -792,7 +741,7 @@ public class test : MonoBehaviour
break; break;
//16.获取任务列表 //获取任务列表
case "hall.GetTaskList": case "hall.GetTaskList":
Debug.Log("-----------move.MoveNpc"); Debug.Log("-----------move.MoveNpc");
TaskListResponse TaskListResponse = ProtoBufffer.DeSerialize<TaskListResponse>(bytes); TaskListResponse TaskListResponse = ProtoBufffer.DeSerialize<TaskListResponse>(bytes);
@ -802,17 +751,16 @@ public class test : MonoBehaviour
} }
break; break;
//19. 界面选项操作 //获取任务列表
case "select.SelectTrigger": case "select.SelectTrigger":
Debug.Log("select.SelectTrigger"); Debug.Log("-----------move.MoveNpc");
SelectResponse selectRequest = ProtoBufffer.DeSerialize<SelectResponse>(bytes); SelectResponse selectRequest = ProtoBufffer.DeSerialize<SelectResponse>(bytes);
Debug.Log(selectRequest); Debug.Log(selectRequest);
break; break;
//获取任务列表
//20. 选项操作记录
case "select.GetSelectHistoryList": case "select.GetSelectHistoryList":
Debug.Log("select.GetSelectHistoryList"); Debug.Log("-----------move.MoveNpc");
SelectHistoryResponse selectHistoryResponse = ProtoBufffer.DeSerialize<SelectHistoryResponse>(bytes); SelectHistoryResponse selectHistoryResponse = ProtoBufffer.DeSerialize<SelectHistoryResponse>(bytes);
foreach(var selectRes in selectHistoryResponse.Selects) foreach(var selectRes in selectHistoryResponse.Selects)
{ {
@ -820,12 +768,6 @@ public class test : MonoBehaviour
} }
break; break;
//21.NPC是否被扛起
case "move.TriggerNpcArrive":
SelectResponse selectResponse = ProtoBufffer.DeSerialize<SelectResponse>(bytes);
break;