ExperienceManager
Allows the player to collect Experience. Contains functions to Add and Remove Experience, and more. You can use these to expand the Experience System and create Shops and more interactions.
useExperience: Flag to indicate if the game uses XP
Ensure this useExperienceis enabled if you want to collect XP in your game. If disabled, you won´t be able to collect XP even if you drag and drop the XP prefab into your scene.
playerLevel: Indicates the current Player Level
experienceRequirements: Array that contains the XP necessary to reach a new level. Remember that Arrays start from Index 0, so Index 0 means Level 1, Index 1 means Level 2 and so on...
Functions & Accesors | ExperienceManager.cs
Instance ( ExperienceManager ) / Public Static Singleton
ExperienceManager Singleton
AddExperience ( int amount )
Add XP to the total count
amount: Amount of XP to add.
RemoveXP ( int amount )
Remove XP from the total count
amount: Amount of XP to remove.
GetPlayerLevel ( ) | Returns an int
Returns the current Player Level
GetCurrentExperience ( ) | Returns a Float
Returns the total player's current experience.
Last updated