public override void SetPosition(int index, Vector3 position) { base.SetPosition(index, position); Lanes.Clear(); for (int i = 1; i < Count; i++) { Lanes.Add(GetLane((Points[i - 1] + Points[i]) / 2)); } }
/// <summary> /// Updates the lane list. /// </summary> public void UpdateLanes() { SqlCommand cmd = new SqlCommand("SELECT LaneID FROM Lane", connection); using (SqlDataReader reader = cmd.ExecuteReader()) { Lanes.Clear(); foreach (var i in reader) { Lanes.Add(reader.GetInt32(0)); } } }