示例#1
0
 /// <summary>
 /// Remove the specific marker entity from the map. If not present does nothing.
 /// </summary>
 /// <param name="mark"></param>
 public void RemoveMarker(GroundMarker mark)
 {
     if (Entities[0].Markers.Contains(mark))
     {
         Entities[0].Markers.Remove(mark);
     }
 }
示例#2
0
 /// <summary>
 /// Remove the specific marker entity from the map. If not present does nothing.
 /// </summary>
 /// <param name="mark"></param>
 public void RemoveMarker(GroundMarker mark)
 {
     if (Markers.Contains(mark))
     {
         Markers.Remove(mark);
     }
 }
示例#3
0
        /// <summary>
        /// Change the position of the specified named marker
        /// </summary>
        /// <param name="name"></param>
        /// <param name="pos"></param>
        public void SetMarkerPosition(string name, Loc pos)
        {
            GroundMarker mark = GetMarker(name);

            if (mark == null)
            {
                throw new KeyNotFoundException(String.Format("GroundMap.SetMarkerPosition({0},{1}): Couldn't find the specified Marker!", name, pos));
            }
            mark.Position = pos;
        }
示例#4
0
        /// <summary>
        /// Returns the position and location of an entry point for the current map by index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public LocRay8 GetEntryPoint(int index)
        {
            if (index >= Entities[0].Markers.Count)
            {
                return(new LocRay8(Loc.Zero, Dir8.Down));
            }
            GroundMarker mark = Entities[0].Markers[index];

            return(new LocRay8(mark.Position, mark.Direction));
        }
示例#5
0
        /// <summary>
        /// Returns the position and location of an entry point for the current map by name.
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public LocRay8 GetEntryPoint(string name)
        {
            GroundMarker mark = GetMarker(name);

            if (mark == null)
            {
                throw new KeyNotFoundException(String.Format("GroundMap.GetMarkerPosition({0}): Couldn't find the specified Marker!", name));
            }

            return(new LocRay8(mark.Position, mark.Direction));
        }
示例#6
0
 /// <summary>
 /// Add the marker entity specified to the map
 /// </summary>
 /// <param name="mark"></param>
 public void AddMarker(GroundMarker mark)
 {
     Entities[0].Markers.Add(mark);
 }
示例#7
0
 protected GroundMarker(GroundMarker other) : base(other)
 {
 }
示例#8
0
 /// <summary>
 /// Add the marker entity specified to the map
 /// </summary>
 /// <param name="mark"></param>
 public void AddMarker(GroundMarker mark)
 {
     Markers.Add(mark);
 }
示例#9
0
        /// <summary>
        /// Returns the position and location of an entry point for the current map by index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public LocRay8 GetEntryPoint(int index)
        {
            GroundMarker mark = Markers[index];

            return(new LocRay8(mark.Position, mark.Direction));
        }