// Handler for enemny object to take and turn into exp. public void GrantExperience(int amount) { CurrentExperience += amount; while (CurrentExperience >= RequiredExperience) { CurrentExperience -= RequiredExperience; Level++; } UIEventHandler.OnPlayerLevelChanged(); }