[ Back ]
Class:
UExperienceComponent :  UActorComponent
Module:
NerveNetCore (NerveNetLibrary Plugin)
Header:
ExperienceComponent.h
Source:
ExperienceComponent.cpp
Description:
Level system that manages experience points.


Variables:
int
CurrentLevel
Current experience level.
int
CurrentLevelExperience
Current experience points.
int
CurrentLevelMaxExperience
Current level experience needed to level up.
int
TotalExperience
Total experience points.
float
InfoDisplayInterpSpeed
Interp speed for display. (0 = No smoothing)
int
MaxLevel
Maximum level that can be reached.
int
ExperienceToLevelUp
Experience points needed to advance to the next level.
float
NextLevelMultiplier
Multiplier used to calculate the experience points needed to advance to the next level.
bool
UseCustomPointLevels
Use custom static level points instead of calculating using multiplier.
TArray
CustomPointLevels
Experience points needed to reach each level if using custom point levels.


Functions:
void
(int Amount)
void
(int Amount)
void
(int& CurrentLevel, int& CurrentLevelExperience, int& CurrentLevelMaxExperience, int& TotalExperience)
int
(int Level)
int
(int Level)
int
(int Experience)



void AddExperience
(
int
Amount
The amount of experience points to add.
)
Adds experience points to the system.


void RemoveExperience
(
int
Amount
The amount of experience points to remove.
)
Removes experience points from the system.


void GetDisplayInfo
(
int&
CurrentLevel
Current level.
int&
CurrentLevelExperience
Current level experience points.
int&
CurrentLevelMaxExperience
Current level max experience points.
int&
TotalExperience
Total experience points through all levels.
)
Returns display info of all leveling data.


int GetLevelMaxExperience
(
int
Level
Level to return the experience points for.
)
Returns the maximum experience points needed for a level.


int GetLevelTotalExperience
(
int
Level
Level to return the experience points for.
)
Returns the experience points required to reach the specified level.


int GetLevelFromExperience
(
int
Experience
Experience points to get level from.
)
Returns the level for experience points.