• A property defined by the map, edf or during instantiation.

    The parser-id refers to a PropertyParser instance and defines how the values of the property are parsed and interpreted. The Engine provides defaults but the game can define its own.

    Replaces:

    static requires = {
    props: {
    myProp1: 'number', << required!
    myProp2: ['number', 2] << with default
    myProp3: {type: 'number', def: 2, }
    }
    }

    With:

    @prop('number')
    private myProp1:number;

    @prop('number')
    private myProp2:number = 2;

    Parameters

    • parserId: string = "any"
    • Optional defaultValue: string | number | boolean
    • Optional propertyInfo: Record<string, any>

    Returns ((target: any, memberName: string) => void)

      • (target: any, memberName: string): void
      • Parameters

        • target: any
        • memberName: string

        Returns void

Generated using TypeDoc