Show / Hide Table of Contents

    Interface IScalingArea

    This component adds the ability for an area to automatically scale each object/character within it (and also 'scale' the volume of sounds coming from that object). The most common use is for faking perspective, so that when a character walks to the top of the screen (closer to the horizon), he will appear smaller and make quieter sounds. For that common use case, you'll want to scale on the Y axis (which is why Y axis is the default), and scale both the object x && y (to keep the aspect ration in tact).

    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(IArea), true)]
    public interface IScalingArea : IComponent, IDisposable, INotifyPropertyChanged

    Properties

    | Improve this Doc View Source

    Axis

    Gets or sets the axis for the scaling. If the axis is y (the default), the scaling will be adjusted based on where the object is located on the area's vertical axis (so most common use is for fake perspective). If the axis is x, the scaling will be adjusted based on where the object is located on the area's horizontal axis.

    Declaration
    ScalingAxis Axis { get; set; }
    Property Value
    Type Description
    ScalingAxis

    The axis.

    | Improve this Doc View Source

    MaxScaling

    Gets or sets the maximum scaling for this area. if the scaling axis is Y (the default), this is the scaling that will be performed at the very bottom of the area. if the scaling axis is X, this is the scaling that will be performed at the very right of the area. Note that if for some reason you want the opposite behavior for either of the axis, you can make MaxScaling smaller than MinScaling.

    Declaration
    float MaxScaling { get; set; }
    Property Value
    Type Description
    System.Single

    The max scaling.

    | Improve this Doc View Source

    MinScaling

    Gets or sets the minimum scaling for this area. if the scaling axis is Y (the default), this is the scaling that will be performed at the very top of the area. if the scaling axis is X, this is the scaling that will be performed at the very left of the area. Note that if for some reason you want the opposite behavior for either of the axis, you can make MaxScaling smaller than MinScaling.

    Declaration
    float MinScaling { get; set; }
    Property Value
    Type Description
    System.Single

    The minimum scaling.

    | Improve this Doc View Source

    ScaleObjectsX

    Gets or sets a value indicating whether this IScalingArea should scale objects x. Usually you'll want both ScaleObjectsX and ScaleObjectsY to be on, but you can turn on only one of them to achieve a stretching effect.

    Declaration
    bool ScaleObjectsX { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if scale objects x; otherwise, false.

    | Improve this Doc View Source

    ScaleObjectsY

    Gets or sets a value indicating whether this IScalingArea should scale objects y. Usually you'll want both ScaleObjectsX and ScaleObjectsY to be on, but you can turn on only one of them to achieve a stretching effect.

    Declaration
    bool ScaleObjectsY { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if scale objects x; otherwise, false.

    | Improve this Doc View Source

    ScaleVolume

    Gets or sets a value indicating whether this IScalingArea should scale the volume.

    Declaration
    bool ScaleVolume { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if scale volume; otherwise, false.

    Methods

    | Improve this Doc View Source

    GetScaling(Single)

    Gets the scaling based on a linear interpolation of the value into the vertical area (if the axis is y) or the horizontal area (if the axis is x). When calling this method, you should pass an x value if the axis is x and a y value if the axis is y.

    Declaration
    float GetScaling(float value)
    Parameters
    Type Name Description
    System.Single value

    Value.

    Returns
    Type Description
    System.Single

    The scaling.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX