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.

This can be found in GeneralManagers object within the Player

  • useExperience: Flag to indicate if the game uses XP

  • 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