Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StatsFactory

Hierarchy

  • StatsFactory

Index

Constructors

Methods

Constructors

constructor

Methods

add

  • add(stat: Stat, initializer?: undefined | ((factory: StatFactory) => any)): this
  • add(stat: Stat, value?: undefined | number, initializer?: undefined | ((factory: StatFactory) => any)): this
  • Note: When adding a stat that already exists in this factory, the previous one will be replaced.

    Parameters

    • stat: Stat
    • Optional initializer: undefined | ((factory: StatFactory) => any)

    Returns this

  • Parameters

    • stat: Stat
    • Optional value: undefined | number
    • Optional initializer: undefined | ((factory: StatFactory) => any)

    Returns this

get

  • Returns IStats

if

  • if(condition: any, initializer: (factory: StatsFactory) => any): this
  • If the condition is not falsey, runs the initializer on this factory.

    Parameters

    Returns this

Generated using TypeDoc