| | |
| | | && MathUtility.DistanceSqrtXZ(DestPos, destPos) < 0.01f
|
| | | && !force)
|
| | | {
|
| | | Debug.LogFormat("3333333 想要切换至目标npc: {0}", destPos);
|
| | | Run();
|
| | | return;
|
| | | }
|
| | |
|
| | | DestPos = destPos;
|
| | |
|
| | | Debug.LogFormat("44444444444 想要切换至目标npc: {0}", destPos);
|
| | | Vector3 _validPos = Pos;
|
| | | if (TryGetValidPos(destPos, ref _validPos))
|
| | | {
|
| | | DestPos = _validPos;
|
| | | m_SearchType = E_SearchType.Static;
|
| | | Debug.LogFormat("55555555 想要切换至目标npc: {0}", DestPos);
|
| | | MoveTo(_validPos, keepDist);
|
| | | }
|
| | | }
|
| | |
| | | #if UNITY_EDITOR
|
| | | Debug.LogFormat("想要切换至目标npc: {0}", _npcID);
|
| | | #endif
|
| | | Debug.LogFormat("想要切换至目标npc: {0}", _npcID);
|
| | | StopCoroutine("CoMoveToNPC");
|
| | | var _data = new MoveToData
|
| | | {
|
| | |
| | | yield break;
|
| | | }
|
| | | }
|
| | |
|
| | | Debug.LogFormat("111111111 想要切换至目标npc: {0}", NpcID);
|
| | | // 判断是否能够得到到达指定点
|
| | | // 获取NPC位置数据
|
| | | GAStaticDefine.NPCLocation _npcLocation;
|
| | |
| | | if (_npc != null)
|
| | | {
|
| | | _destPostion = _npc.Pos;
|
| | |
|
| | | Debug.LogFormat("222222222 想要切换至目标npc: {0}", _destPostion);
|
| | | NpcID = NpcID;
|
| | | MapTransferDoType = E_MapTransferDoType.Npc;
|
| | |
|