コード例 #1
0
 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
                         );
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 public void SetRadarAreaSize(RadarArea radarArea, Vector2 size)
 {
     radarArea.Size = size;
 }
コード例 #4
0
 public void SetRadarAreaFlashing(RadarArea radarArea, bool flashing)
 {
     radarArea.IsFlashing = flashing;
 }
コード例 #5
0
 public void SetRadarAreaColor(RadarArea radarArea, Color color)
 {
     radarArea.Color = color;
 }
コード例 #6
0
 public bool IsRadarAreaFlashing(RadarArea radarArea) => radarArea.IsFlashing;
コード例 #7
0
 public bool IsInsideRadarArea(RadarArea radarArea, Vector2 position) => radarArea.IsInside(position);
コード例 #8
0
 public Vector2 GetRadarAreaSize(RadarArea radarArea) => radarArea.Size;
コード例 #9
0
 public Color GetRadarAreaColor(RadarArea radarArea) => radarArea.Color;
コード例 #10
0
    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);
    }