![]() |
Eye of the Nile Docs
Everything you need to know to get started!
|
Contains all the player's stats that can be modified by abilities using StatModifiers (see PlayerStat, StatModifier, and StatsAE). You can add new player stats using the editor, but make sure you implement the corresponding functionality into the proper script. To see an example of how to link a value in another script to a player stat, see PlayerHealth.
Documentation updated 9/1/2024
Public Member Functions | |
float | GetValue (string statName) |
Returns the value of the given stat. | |
PlayerStat | GetStat (string statName) |
Returns the PlayerStat object of the given stat. | |
void | InitializeDictionary () |
Populates playerStatDict with every PlayerStat object in playerStats and their corresponding name. | |
Public Attributes | |
List< PlayerStat > | playerStats |
List of all player stats. | |
Properties | |
bool | IsInitialized = false [get, set] |
True if playerStatDict has been populated with every PlayerStat object in playerStats and their corresponding name. | |
Private Member Functions | |
void | Awake () |
Runs InitializeDictionary(). | |
Private Attributes | |
Dictionary< string, PlayerStat > | playerStatDict |
Dictionary linking each player stat object to its name. | |
|
private |
Runs InitializeDictionary().
PlayerStat PlayerStatHolder.GetStat | ( | string | statName | ) |
Returns the PlayerStat object of the given stat.
float PlayerStatHolder.GetValue | ( | string | statName | ) |
Returns the value of the given stat.
void PlayerStatHolder.InitializeDictionary | ( | ) |
Populates playerStatDict with every PlayerStat object in playerStats and their corresponding name.
|
private |
Dictionary linking each player stat object to its name.
List<PlayerStat> PlayerStatHolder.playerStats |
List of all player stats.
|
getset |
True if playerStatDict has been populated with every PlayerStat object in playerStats and their corresponding name.