| | |
| | | |
| | | public Vector3 GetNext1(Vector3 start, Vector3 dest) |
| | | { |
| | | count = 0; |
| | | m_ChkedList1.Clear(); |
| | | |
| | | if (PathFinder.WalkAble(start, dest)) |
| | |
| | | var _tp = _t.transferPoints[i]; |
| | | if (PathFinder.WalkAble(next, _tp.position)) |
| | | { |
| | | //Debug.Log("_tp.position : " + _tp.position); |
| | | if (i == 0) |
| | | { |
| | | _targetPos = _t.transferPoints[_t.transferPoints.Length - 1].position; |
| | |
| | | } |
| | | |
| | | m_ChkedList.Add(_t); |
| | | break; |
| | | } |
| | | } |
| | | if (_targetPos != Vector3.zero) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (PathFinder.WalkAble(start, _targetPos)) |
| | | { |
| | |
| | | { |
| | | _targetPos = GetNext(start, _targetPos); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //Debug.Log("_targetPos: " + _targetPos); |
| | | |
| | | return _targetPos; |
| | | } |