| | |
| | | NpcID = NpcID;
|
| | | MapTransferDoType = E_MapTransferDoType.Npc;
|
| | |
|
| | | while (true)
|
| | | {
|
| | | if (PathFinder.WalkAble(_hero.Pos, _destPostion))
|
| | | {
|
| | | break;
|
| | | }
|
| | | Vector3 _nextPos;
|
| | | if (!ClientSceneManager.Instance.AAA(_hero.Pos, _destPostion, out _nextPos))
|
| | | {
|
| | | Debug.LogErrorFormat("移动至NPC: {0} 时找不到任何跳跃点, NextPos: {1}", NpcID, _nextPos);
|
| | | break;
|
| | | }
|
| | | float _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
|
| | | while (_dis > 0.01f)
|
| | | {
|
| | | _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
|
| | | _hero.MoveToPosition(_nextPos);
|
| | | yield return null;
|
| | | }
|
| | | while (!GA_Hero.s_Flying)
|
| | | {
|
| | | yield return null;
|
| | | }
|
| | | while (GA_Hero.s_Flying)
|
| | | {
|
| | | yield return null;
|
| | | }
|
| | | }
|
| | |
|
| | | _hero.MoveToPosition(_destPostion, 1);
|
| | | yield break;
|
| | | }
|
| | |
| | | private void MoveToExistNpc(int npcID, GActor npc)
|
| | | {
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | | Debug.Log("11111111111111");
|
| | |
|
| | | NPCConfig _config = NPCConfig.Get(npcID);
|
| | |
|