/// <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); } }
/// <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); } }
/// <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; }
/// <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)); }
/// <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)); }
/// <summary> /// Add the marker entity specified to the map /// </summary> /// <param name="mark"></param> public void AddMarker(GroundMarker mark) { Entities[0].Markers.Add(mark); }
protected GroundMarker(GroundMarker other) : base(other) { }
/// <summary> /// Add the marker entity specified to the map /// </summary> /// <param name="mark"></param> public void AddMarker(GroundMarker mark) { Markers.Add(mark); }
/// <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)); }