private void GenerateHighLevelPath() { this.ClearPathNodes(); if (this.m_hlBegin != null) { MyPath <MyNavigationPrimitive> path = this.m_goal.FindHighLevelPath(this.m_pathfinding, this.m_hlBegin); if (path != null) { using (IEnumerator <MyPath <MyNavigationPrimitive> .PathNode> enumerator = path.GetEnumerator()) { while (enumerator.MoveNext()) { MyHighLevelPrimitive vertex = enumerator.Current.Vertex as MyHighLevelPrimitive; this.m_pathNodes.Add(vertex); if (!ReferenceEquals(vertex, this.m_hlBegin)) { vertex.Parent.ObservePrimitive(vertex, this); } } } this.m_pathNodePosition = 0; } } }