Class: SystemStatistic

SystemStatistic

A statistic of the game

new SystemStatistic (json)

Name Type Description
json Object optional Json object describing the statistic
Properties:
Name Type Description
name string The name of the statistic
abbreviation string The abbreviation of the statistic (for javascript code)
isFix boolean Indicate if this statistic is fix (no bar)

Methods

SystemStatistic.createElementRes (id, name)SystemStatistic static

Create an res percent element
Name Type Description
id number The element id
name string The element name
Returns:
Type Description
SystemStatistic

SystemStatistic.createElementResPercent (id, name)SystemStatistic static

Create an res percent element
Name Type Description
id number The element id
name string The element name
Returns:
Type Description
SystemStatistic

read (json)

Read the JSON associated to the statistic
Name Type Description
json Object Json object describing the statistic

getMaxAbbreviation ()string

Get the max abbreviation
Returns:
Type Description
string

getBeforeAbbreviation ()string

Get the before abbreviation
Returns:
Type Description
string

getBonusAbbreviation ()string

Get the bonus abbreviation
Returns:
Type Description
string

getAbbreviationNext ()string

Get the next abbreviation
Returns:
Type Description
string