Class Zone
Defines an area for a scene.
Inherited Members
Namespace: SadConsole.Entities
Assembly: SadConsole.Extended.dll
Syntax
[DataContract]
public class Zone : ScreenObject, IScreenObject, IPositionable, IComponentHost
Constructors
Zone(Area)
Creates a new zone object with the specified area.
Declaration
public Zone(Area area)
Parameters
Type | Name | Description |
---|---|---|
Area | area | The area of the zone. |
Zone(Rectangle)
Creates a new zone object using the positions of a rectangle.
Declaration
public Zone(Rectangle area)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | area | The area of the zone. |
Zone(IEnumerable<Point>)
Creates a new zone object using the specified positions.
Declaration
public Zone(IEnumerable<Point> positions)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Point> | positions | The positions that make up the zone. |
Fields
Area
The area the zone covers.
Declaration
[DataMember]
public readonly Area Area
Field Value
Type | Description |
---|---|
Area |
Settings
Key-value pairs for the zone.
Declaration
[DataMember]
public Dictionary<string, string> Settings
Field Value
Type | Description |
---|---|
Dictionary<string, string> |
Properties
Appearance
A visual for the area to help debug.
Declaration
[DataMember]
public ColoredGlyphBase? Appearance { get; set; }
Property Value
Type | Description |
---|---|
ColoredGlyphBase |
Entities
A list of entities in the
Declaration
public IReadOnlyList<Entity> Entities { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Entity> |
Name
The name of the zone.
Declaration
[DataMember]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
ToString()
Returns the string "Zone - " followed by the Name of the zone. If the name is empty, appends the Area bounds.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The name of the zone. |