Exemplo n.º 1
0
 private void RecomputePath()
 {
     if (m_EndPos != Vector3.zero && m_StartPos != Vector3.zero)
     {
         m_DbgPathRenderer.Clear();
         m_ComputedPathType = m_PathType;
         if (m_PathType == PathType.Smooth)
         {
             m_SmoothPath = RcdtcsUnityUtils.ComputeSmoothPath(m_System.m_navQuery, m_StartPos, m_EndPos);
             m_DbgPathRenderer.AddPath(m_SmoothPath.m_smoothPath, m_SmoothPath.m_nsmoothPath, 1.25f, Color.black, Color.white);
         }
         else if (m_PathType == PathType.Straight)
         {
             m_StraightPath = RcdtcsUnityUtils.ComputeStraightPath(m_System.m_navQuery, m_StartPos, m_EndPos);
             m_DbgPathRenderer.AddPath(m_StraightPath.m_straightPath, m_StraightPath.m_straightPathCount, 1.25f, Color.black, Color.white);
         }
         m_DbgPathRenderer.Rebuild();
     }
 }