private void LocateAgent() { if (RouteList.Count > 1 || RoadGraph == null) { RoadGraph.ViewedNodes.Clear(); RouteList = RoadGraph.GetNodesWay(RouteList.First(), RouteList.Last()); Position = RouteList.First().Location; base.CurrentSpeed = base._maxSpeed; _located = true; } else { RouteList.Clear(); } }