示例#1
0
 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));
     }
 }
示例#2
0
        /// <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));
                }
            }
        }