Eye of the Nile Docs
Everything you need to know to get started!
Loading...
Searching...
No Matches
PlayerStatHolder Class Reference

Detailed Description

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

Author
Roy Pascual

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< PlayerStatplayerStats
 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, PlayerStatplayerStatDict
 Dictionary linking each player stat object to its name.
 

Member Function Documentation

◆ Awake()

void PlayerStatHolder.Awake ( )
private

◆ GetStat()

PlayerStat PlayerStatHolder.GetStat ( string statName)

Returns the PlayerStat object of the given stat.

◆ GetValue()

float PlayerStatHolder.GetValue ( string statName)

Returns the value of the given stat.

◆ InitializeDictionary()

void PlayerStatHolder.InitializeDictionary ( )

Populates playerStatDict with every PlayerStat object in playerStats and their corresponding name.

Member Data Documentation

◆ playerStatDict

Dictionary<string, PlayerStat> PlayerStatHolder.playerStatDict
private

Dictionary linking each player stat object to its name.

◆ playerStats

List<PlayerStat> PlayerStatHolder.playerStats

List of all player stats.

Property Documentation

◆ IsInitialized

bool PlayerStatHolder.IsInitialized = false
getset

True if playerStatDict has been populated with every PlayerStat object in playerStats and their corresponding name.


The documentation for this class was generated from the following file: