测试调用npc移动

This commit is contained in:
huyulong 2024-12-12 17:07:43 +08:00
parent b4f601691d
commit 54a8aa476e
2 changed files with 9 additions and 3 deletions

View File

@ -341,7 +341,7 @@ public class test : MonoBehaviour
if (wEBScriptListener != null)
{
lodingWebSocket();
JoinRoom();
//JoinRoom();
Heartbeat();
//BroadcastMessage();
//UpFps();
@ -352,7 +352,7 @@ public class test : MonoBehaviour
//Location();
//TaskTrigger();
//TaskUpdateRequest();
NpcMove();
}
//int index = 0;
//while (true)
@ -428,6 +428,8 @@ public class test : MonoBehaviour
Debug.Log("-=====--");
LoginResponse user = ProtoBufffer.DeSerialize<LoginResponse>(bytes);
Debug.Log(user);
//这里是测试阶段用的,在登录之后调用加入房间,后续会删掉
JoinRoom();
break;
//进入房间
@ -436,6 +438,8 @@ public class test : MonoBehaviour
byte[] joinByte = joinRoomResponse.Data.ToByteArray();
PlayerJoinResponse playerJoinResponse = ProtoBufffer.DeSerialize<PlayerJoinResponse>(joinByte);
Debug.Log("玩家:"+playerJoinResponse.UserName+"加入房间:"+playerJoinResponse.RoomId.ToString());
break;
//广播
@ -513,6 +517,8 @@ public class test : MonoBehaviour
// 使用指定的世界坐标位置来实例化 NPC而不是依赖 trans 位置
GameObject.Instantiate(npc, position, Quaternion.identity); // 直接指定位置和旋转
// Npc生成后调用选择路线,=================这里也会删掉在等UI逻辑那边处理完
NpcMove();
}
if(npcData.Type == 2)//npc移动
{

@ -1 +1 @@
Subproject commit 0385375c1818fc57f42407a6c5301a26ded3a19a
Subproject commit 2e42b278d4c6ac9e045925dcc6e04896a19cbfd8