Methods
add
- add(stat: Stat, initializer?: ((factory: default) => any)): StatsFactory
-
Parameters
-
-
Optional
initializer: ((factory: default) => any)
-
- (factory: default): any
-
Returns any
- add(stat: Stat, value?: number, initializer?: ((factory: default) => any)): StatsFactory
-
Parameters
-
-
Optional
value: number
-
Optional
initializer: ((factory: default) => any)
-
- (factory: default): any
-
Returns any
get
- get(): IStats
-
if
- if(condition: any, initializer: ((factory: StatsFactory) => any)): StatsFactory
-
Parameters
-
condition: any
-
initializer: ((factory: StatsFactory) => any)
Note: When adding a stat that already exists in this factory, the previous one will be replaced.