Show / Hide Table of Contents

    Interface IAreaComponent

    Areas are specific regions in a room that provide additional behaviors that apply only within that region.

    Inherited Members
    IComponent.Name
    IComponent.Entity
    IComponent.RegistrationType
    IComponent.Init(IEntity, Type)
    IComponent.AfterInit()
    System.IDisposable.Dispose()
    System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    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 Source

    Enabled

    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

    true if enabled; otherwise, false.

    | Improve this Doc View Source

    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 Source

    FindClosestPoint(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.

    | Improve this Doc View Source

    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

    true, if is inside the area, false otherwise.

    | Improve this Doc View Source

    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

    true, if point is inside area, false otherwise.

    See Also

    IWalkableArea
    IWalkBehindArea
    IScalingArea
    IZoomArea
    IAreaRestriction
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX