新增NpcMove接口

This commit is contained in:
huyulong 2024-12-12 17:00:17 +08:00
parent f9356cc0d4
commit df42382aa8
2 changed files with 86 additions and 9 deletions

View File

@ -233,7 +233,6 @@ public class test : MonoBehaviour
//}
//¿ªÊ¼¼Æʱ
void RoomStartTime()
{
@ -310,6 +309,23 @@ public class test : MonoBehaviour
wEBScriptListener.SendMessageByte(sendData);
}
public void NpcMove()
{
MoveRequest data = new MoveRequest();
data.RoomId = "168888";
data.SelectId = 10821;
WSMessage msg = new WSMessage();
msg.Module = "move";
msg.ServiceName = "MoveNpc";
msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data));
byte[] sendData = ProtoBufffer.Serialize(msg);
WSMessage deinfo = ProtoBufffer.DeSerialize<WSMessage>(sendData);
MoveRequest login = ProtoBufffer.DeSerialize<MoveRequest>(deinfo.Data.ToByteArray());
Debug.Log("==========Ñ¡Ôñ·Ïß");
//BroadcastFrameMsg.FramesFieldNumber
wEBScriptListener.SendMessageByte(sendData);
}
@ -325,7 +341,7 @@ public class test : MonoBehaviour
if (wEBScriptListener != null)
{
lodingWebSocket();
//JoinRoom();
JoinRoom();
Heartbeat();
//BroadcastMessage();
//UpFps();
@ -336,6 +352,7 @@ public class test : MonoBehaviour
//Location();
//TaskTrigger();
//TaskUpdateRequest();
NpcMove();
}
//int index = 0;
//while (true)
@ -522,7 +539,7 @@ public class test : MonoBehaviour
//¸üÐÂÈÎÎñ
case "task.UpdateTask":
Debug.Log("-----------task.TaskTrigger");
TaskUpdateRequest taskUpdateRequest = ProtoBufffer.DeSerialize<TaskUpdateRequest>(bytes);
MoveRequest taskUpdateRequest = ProtoBufffer.DeSerialize<MoveRequest>(bytes);
Debug.Log(taskUpdateRequest);
break;
@ -534,6 +551,14 @@ public class test : MonoBehaviour
Debug.Log(requestObject);
break;
//¶ÔÏó´¥·¢²Ù×÷
case "move.MoveNpc":
Debug.Log("-----------move.MoveNpc");
MoveRequest moveRequest = ProtoBufffer.DeSerialize<MoveRequest>(bytes);
Debug.Log(moveRequest);
break;

View File

@ -7853,7 +7853,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 810501276}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -18.09, y: 0.5, z: 35.56}
m_LocalPosition: {x: 30, y: 0.5, z: 22.74}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@ -10869,6 +10869,10 @@ PrefabInstance:
propertyPath: m_Name
value: obj202
objectReference: {fileID: 0}
- target: {fileID: -8282288472169970500, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj224
objectReference: {fileID: 0}
- target: {fileID: -6327141709703751677, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj153
@ -10881,10 +10885,26 @@ PrefabInstance:
propertyPath: m_Name
value: obj024
objectReference: {fileID: 0}
- target: {fileID: -3237221884521187588, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj222
objectReference: {fileID: 0}
- target: {fileID: -2654505143154747466, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj220
objectReference: {fileID: 0}
- target: {fileID: -1788689016301746583, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj205
objectReference: {fileID: 0}
- target: {fileID: -241233108021658044, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj210
objectReference: {fileID: 0}
- target: {fileID: -106440716057841632, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj221
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: school03
@ -10897,14 +10917,46 @@ PrefabInstance:
propertyPath: m_Name
value: obj204
objectReference: {fileID: 0}
- target: {fileID: 3184295249035706133, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj208
objectReference: {fileID: 0}
- target: {fileID: 4315024395822287230, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj198
objectReference: {fileID: 0}
- target: {fileID: 5427673003371859311, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj223
objectReference: {fileID: 0}
- target: {fileID: 7077992237008472060, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj206
objectReference: {fileID: 0}
- target: {fileID: 7322491252510880854, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj226
objectReference: {fileID: 0}
- target: {fileID: 7455878101187352886, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj225
objectReference: {fileID: 0}
- target: {fileID: 8052244126148009048, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj122
objectReference: {fileID: 0}
- target: {fileID: 8443362320608252490, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj207
objectReference: {fileID: 0}
- target: {fileID: 8661539485286681749, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj209
objectReference: {fileID: 0}
- target: {fileID: 8816389197232921522, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
propertyPath: m_Name
value: obj219
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: eec919b17e074b747899fe01d7888a2c, type: 3}
--- !u!1 &1124162635 stripped