Fixed LevelUp()
-No longer resets exp to 0, limiting to one level per AFK --Instead, { currentExp -= previousRequirement; }
This commit is contained in:
parent
a04e1e1225
commit
cc86eabeef
|
@ -68,7 +68,7 @@ public class ExperienceBar : MonoBehaviour {
|
||||||
++currentLevel;
|
++currentLevel;
|
||||||
currentLevelText.GetComponent<Text>().text = currentLevel.ToString();
|
currentLevelText.GetComponent<Text>().text = currentLevel.ToString();
|
||||||
previousExpRequired = currentRequirement;
|
previousExpRequired = currentRequirement;
|
||||||
currentExp = 0;
|
currentExp -= previousExpRequired;
|
||||||
currentRequirement = Mathf.Pow(currentRequirement, 1.05f);
|
currentRequirement = Mathf.Pow(currentRequirement, 1.05f);
|
||||||
GameObject.FindGameObjectWithTag("Player").GetComponent<SpinningCube>().RaiseRotationSpeed();
|
GameObject.FindGameObjectWithTag("Player").GetComponent<SpinningCube>().RaiseRotationSpeed();
|
||||||
}
|
}
|
||||||
|
@ -77,8 +77,8 @@ public class ExperienceBar : MonoBehaviour {
|
||||||
{
|
{
|
||||||
currentLevel = 1;
|
currentLevel = 1;
|
||||||
currentLevelText.GetComponent<Text>().text = currentLevel.ToString();
|
currentLevelText.GetComponent<Text>().text = currentLevel.ToString();
|
||||||
fillAmount = 0;
|
|
||||||
currentExp = 0;
|
currentExp = 0;
|
||||||
|
fillAmount = 0;
|
||||||
currentRequirement = 100;
|
currentRequirement = 100;
|
||||||
clicksNeeded = 10;
|
clicksNeeded = 10;
|
||||||
clicks = 0;
|
clicks = 0;
|
||||||
|
|
Loading…
Reference in New Issue