From cc86eabeef3e2c769b1dd9218cf33a2f95c6d951 Mon Sep 17 00:00:00 2001 From: Shaun M Reed Date: Mon, 4 Sep 2017 15:30:19 -0400 Subject: [PATCH] Fixed LevelUp() -No longer resets exp to 0, limiting to one level per AFK --Instead, { currentExp -= previousRequirement; } --- Assets/Scripts/ExperienceBar.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/ExperienceBar.cs b/Assets/Scripts/ExperienceBar.cs index 5dac423..ee9b807 100644 --- a/Assets/Scripts/ExperienceBar.cs +++ b/Assets/Scripts/ExperienceBar.cs @@ -68,7 +68,7 @@ public class ExperienceBar : MonoBehaviour { ++currentLevel; currentLevelText.GetComponent().text = currentLevel.ToString(); previousExpRequired = currentRequirement; - currentExp = 0; + currentExp -= previousExpRequired; currentRequirement = Mathf.Pow(currentRequirement, 1.05f); GameObject.FindGameObjectWithTag("Player").GetComponent().RaiseRotationSpeed(); } @@ -77,8 +77,8 @@ public class ExperienceBar : MonoBehaviour { { currentLevel = 1; currentLevelText.GetComponent().text = currentLevel.ToString(); - fillAmount = 0; currentExp = 0; + fillAmount = 0; currentRequirement = 100; clicksNeeded = 10; clicks = 0;