UnitStats
Last updated
Last updated
Contains stats data for units.
Name | Description | Type |
---|---|---|
Initializes the stats. This is called automatically by the UnitStatsProvider component.
Parameters
Name | Description | Type |
---|---|---|
Sets the unit's level.
Parameters
Name | Description | Type |
---|---|---|
Updates stat values so that they reflect the unit's level.
Resets all stats. This will remove all combined stats.
Adds an upgradable stat.
Parameters
Removes an upgradable stat by name.
Parameters
Removes an upgradable stat by index.
Parameters
Name | Description | Type |
---|---|---|
Name | Description | Type |
---|---|---|
Name | Description | Type |
---|---|---|
unitName
The name of this unit.
string
unitLevel
The level of this unit. It's recommended to use UnitStats.LevelUp or UnitStats.LevelDown to change this value.
int
stats
A list of upgradable stats for this unit.
List<UpgradableStat>
statsProviderReference
The UnitStatsProvider reference.
UnitStatsProvider
level
The level to set to.
int
stat
The upgradable stat to add.
UpgradableStat
name
The name or short name of the stat's identity.
string
index
The stat index.
int