public bool TryGetPath(ref List <Vec3> p, ref DestType p_dest_type) { if (PathLock.TryEnterReadLock(0)) { p = new List <Vec3>(m_Path); p_dest_type = m_PathDestType; PathLock.ExitReadLock(); return(true); } return(false); }
public float TryGetPathLength(ref DestType p_dest_type) { float length = 0; if (PathLock.TryEnterReadLock(0)) { for (int i = 0; i < m_Path.Count - 1; ++i) { length += m_Path[i].Distance2D(m_Path[i + 1]); } p_dest_type = m_PathDestType; PathLock.ExitReadLock(); } return(length); }