Show / Hide Table of Contents

    Interface ICustomPropertiesPerType<TValue>

    Custom properties that you can attach to entities and can be used to get/set values during the game.

    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    public interface ICustomPropertiesPerType<TValue>
    Type Parameters
    Name Description
    TValue

    Methods

    | Improve this Doc View Source

    AllProperties()

    Returns a dictionary with all existing custom properties for this type.

    Declaration
    IDictionary<string, TValue> AllProperties()
    Returns
    Type Description
    System.Collections.Generic.IDictionary<System.String, TValue>

    The properties.

    | Improve this Doc View Source

    CopyFrom(ICustomPropertiesPerType<TValue>)

    Copies the custom properties from a different object (this will override values in the current object, but will not delete properties which don't have an equivalent in the given object).

    Declaration
    void CopyFrom(ICustomPropertiesPerType<TValue> properties)
    Parameters
    Type Name Description
    ICustomPropertiesPerType<TValue> properties

    Properties.

    | Improve this Doc View Source

    GetValue(String, TValue)

    Gets the stored value for the custom property with the specified name. If no value is stored for this property, returns the specified default value instead (and stored that default value as the property's new value).

    Declaration
    TValue GetValue(string name, TValue defaultValue = null)
    Parameters
    Type Name Description
    System.String name

    Name.

    TValue defaultValue

    Default value.

    Returns
    Type Description
    TValue

    The value.

    | Improve this Doc View Source

    SetValue(String, TValue)

    Stores a new value for the custom property with the specified name. If an old value is stored it will be overridden by the new value.

    Declaration
    void SetValue(string name, TValue value)
    Parameters
    Type Name Description
    System.String name

    Name.

    TValue value

    Value.

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