寻路相关逻辑更改

This commit is contained in:
huyulong 2024-12-14 14:31:48 +08:00
parent 24266873f8
commit e5c5f68ac5
2 changed files with 3 additions and 2 deletions

View File

@ -539,9 +539,9 @@ public class test : MonoBehaviour
break;
case "move.Location":
Debug.Log("move.Location接受到了");
//Debug.Log("move.Location接受到了");
NpcData npcData = ProtoBufffer.DeSerialize<NpcData>(bytes);
Debug.Log(npcData);
//Debug.Log(npcData);
if(npcData.Type == 1)//npc´´½¨
{
float x = -float.Parse(npcData.X.ToString());

View File

@ -86,6 +86,7 @@ public class RecuseNpc : MonoBehaviour
//添加npc的目的地到list中
public void SetNpcDes(Vector3 tar)
{
Debug.Log(tar);
//target.position = tar;
NavMeshHit hit;
if (!NavMesh.SamplePosition(tar, out hit, 1.0f, NavMesh.AllAreas))