Interface IAreaComponent
Areas are specific regions in a room that provide additional behaviors that apply only within that region.
Inherited Members
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
[RequiredComponent(typeof(ITranslateComponent), false)]
[RequiredComponent(typeof(IRotateComponent), false)]
public interface IAreaComponent : IComponent, IDisposable, INotifyPropertyChanged
Properties
| Improve this Doc View SourceEnabled
Gets or sets a value indicating whether this IAreaComponent is enabled. This would affect all the components attached to this area (so if an area is both a walkable area and a scaling area, having it disabled will disable both).
Declaration
bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Mask
Gets or sets the mask which defines the area (each cell with 1 in the mask is part of the area).
Declaration
IMask Mask { get; set; }
Property Value
| Type | Description |
|---|---|
| IMask | The mask. |
Methods
| Improve this Doc View SourceFindClosestPoint(PointF, out Single)
Finds the closest point in the area to the specified point, and also returns the distance between the points.
Declaration
PointF? FindClosestPoint(PointF point, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| PointF | point | Point. |
| System.Single | distance | Distance. |
Returns
| Type | Description |
|---|---|
| System.Nullable<PointF> | The closest point. |
IsInArea(PointF)
Is the specified point inside the area?
Declaration
bool IsInArea(PointF point)
Parameters
| Type | Name | Description |
|---|---|---|
| PointF | point | Point. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
IsInArea(PointF, AGSBoundingBox, Single, Single)
Is the specified point inside the area after being projected and scaled?
Declaration
bool IsInArea(PointF point, AGSBoundingBox projectionBox, float scaleX, float scaleY)
Parameters
| Type | Name | Description |
|---|---|---|
| PointF | point | Point. |
| AGSBoundingBox | projectionBox | Projection box. |
| System.Single | scaleX | Scale x. |
| System.Single | scaleY | Scale y. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|