Balanced Xp gains
This commit is contained in:
@@ -133,8 +133,11 @@ public class DBmanager : MonoBehaviour
|
||||
// i
|
||||
// }
|
||||
|
||||
level = 1 + (Mathf.Sqrt((float)xp / 100f));
|
||||
Debug.Log("Level : " + (float)xp / 100f + " : " + level);
|
||||
level = (Mathf.Sqrt((float)Mathf.Clamp(xp,100,float.PositiveInfinity) / 100f));
|
||||
if(level == LevelInt){
|
||||
level-=0.1f;
|
||||
}
|
||||
Debug.Log("Level : " + (float)xp / 100f + " : " + level + " : " + LevelInt);
|
||||
GameManagerInstance.gameManager.RefreshData();
|
||||
OnStateChanged.Invoke();
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class GameManager : MonoBehaviour
|
||||
levelTxt.text = Mathf.CeilToInt(DBmanager.Level).ToString();
|
||||
|
||||
float levelExcess = DBmanager.Level - Mathf.FloorToInt(DBmanager.Level);
|
||||
levelSlider.value = levelExcess;
|
||||
levelSlider.value = Mathf.Clamp(levelExcess, 0.1f,1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user