public void AddExperience(float exp) { currentLevelExperience += exp; if (currentLevelExperience >= experienceToLevel) { currentLevelExperience -= experienceToLevel; LevelUp(); } gui.SetPlayerExperience(currentLevelExperience / experienceToLevel, level); }
public void AddExperience(float exp) { currentLevelExperience += exp; if (currentLevelExperience >= experienceToLevel) { currentLevelExperience -= experienceToLevel; LevelUp(); } gui.SetPlayerExperience(currentLevelExperience / experienceToLevel, level); Debug.Log("EXP: " + currentLevelExperience + " Level: " + level); }