| | |
| | | set
|
| | | {
|
| | | m_State = value;
|
| | | //if (ServerInstID == PlayerDatas.Instance.PlayerId)
|
| | | //{
|
| | | // Debug.Log("状态改变: " + State.ToString());
|
| | | //}
|
| | | // if (ServerInstID == PlayerDatas.Instance.PlayerId)
|
| | | // {
|
| | | // Debug.Log("状态改变: " + value.ToString());
|
| | | // }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (PathFindStatus == E_PathFindStatus.Moving
|
| | | && m_SearchType == E_SearchType.Static
|
| | | && DestPos == destPos)
|
| | | && MathUtility.DistanceSqrtXZ(DestPos, destPos) < 0.01f)
|
| | | {
|
| | | Run();
|
| | | return;
|
| | |
| | | {
|
| | | OnPathFindStop();
|
| | | }
|
| | |
|
| | | // if (ServerInstID == PlayerDatas.Instance.PlayerId)
|
| | | // {
|
| | | // Debug.Log("停止了移动");
|
| | | // }
|
| | | }
|
| | |
|
| | | private void MoveTo(Vector3 position, float keepDist = 0)
|
| | |
| | |
|
| | | if (NavMesh.CalculatePath(_curPos, position, NavMesh.AllAreas, m_Path))
|
| | | {
|
| | | //if (this is GA_Hero)
|
| | | //{
|
| | | // Debug.LogFormat("调用了 {0} 的寻路, 目标点: {1}", ServerInstID, position);
|
| | | //}
|
| | | // if (this is GA_Hero)
|
| | | // {
|
| | | // Debug.LogFormat("调用了 {0} 的寻路, 目标点: {1}", ServerInstID, position);
|
| | | // }
|
| | | m_CornerIndex = 0;
|
| | | m_KeepDist = keepDist;
|
| | | PathFindStatus = E_PathFindStatus.Moving;
|
| | |
| | | {
|
| | | _deltaDis = .5f;
|
| | | }
|
| | | Vector3 _prePos = Pos;
|
| | | Pos += _deltaDis * _dir;
|
| | | Vector3 _detalMove = _deltaDis * _dir;
|
| | | Pos += _detalMove;
|
| | | }
|
| | |
|
| | | if (OnPathFinding != null)
|