public void AddRadarArea(RadarArea element) { packet.AddRadarArea(element.Id, (byte)element.ElementType, element.Parent?.Id ?? 0, element.Interior, element.Dimension, null, element.AreCollisionsEnabled, element.IsCallPropagationEnabled, new CustomData(), element.Name, element.TimeContext, element.Position2, element.Size, element.Color, element.IsFlashing ); }
private void AddRadarArea(RadarArea radarArea) { this.radarAreas.Add(radarArea); radarArea.Destroyed += (source) => this.radarAreas.Remove(radarArea); radarArea.ColorChanged += ColorChanged; radarArea.SizeChanged += SizeChanged; radarArea.FlashingStateChanged += FlashingStateChanged; }
public void SetRadarAreaSize(RadarArea radarArea, Vector2 size) { radarArea.Size = size; }
public void SetRadarAreaFlashing(RadarArea radarArea, bool flashing) { radarArea.IsFlashing = flashing; }
public void SetRadarAreaColor(RadarArea radarArea, Color color) { radarArea.Color = color; }
public bool IsRadarAreaFlashing(RadarArea radarArea) => radarArea.IsFlashing;
public bool IsInsideRadarArea(RadarArea radarArea, Vector2 position) => radarArea.IsInside(position);
public Vector2 GetRadarAreaSize(RadarArea radarArea) => radarArea.Size;
public Color GetRadarAreaColor(RadarArea radarArea) => radarArea.Color;
public RadarArea CreateRadarArea(Vector2 position, Vector2 size, Color?color = null, Player?visibleFor = null) { var radarArea = new RadarArea(position, size, color ?? Color.FromArgb(255, 0, 0, 255)).AssociateWith(this.server); return(radarArea); }