Skip to content

Zone Class

Defines an area for a scene.

C#
[DataContract]
public class Zone : ScreenObject, IScreenObject, IPositionable, IComponentHost

Inheritance objectScreenObject

Implements IScreenObject, SadRogue.Primitives.IPositionable, IComponentHost

Creates a new zone object with the specified area.

C#
public Zone(Area area)

area SadRogue.Primitives.Area
The area of the zone.

Creates a new zone object using the positions of a rectangle.

C#
public Zone(Rectangle area)

area SadRogue.Primitives.Rectangle
The area of the zone.

Creates a new zone object using the specified positions.

C#
public Zone(IEnumerable<Point> positions)

positions IEnumerable<Point>
The positions that make up the zone.

The area the zone covers.

C#
[DataMember]
public readonly Area Area

Key-value pairs for the zone.

C#
[DataMember]
public Dictionary<string, string> Settings

A visual for the area to help debug.

C#
[DataMember]
public ColoredGlyphBase? Appearance { get; set; }

The name of the zone.

C#
[DataMember]
public string Name { get; set; }

A list of entities in the

C#
public IReadOnlyList<Entity> Entities { get; }

Returns the string “Zone - ” followed by the Name of the zone. If the name is empty, appends the Area bounds.

C#
public override string ToString()

string
The name of the zone.