Add Level/XP to profile
This commit is contained in:
@@ -30,6 +30,7 @@ public class ProfileMenu : MonoBehaviour
|
||||
[SerializeField] private TMP_Text antiBerryStat;
|
||||
[SerializeField] private TMP_Text goldenBerryStat;
|
||||
[SerializeField] private TMP_Text coinStat;
|
||||
[SerializeField] private TMP_Text playerLevelAndXPStat;
|
||||
[SerializeField] private TMP_Text playerNameText;
|
||||
[SerializeField] private Image playerIconImage;
|
||||
[SerializeField] private Image playerOverlayImage;
|
||||
@@ -65,6 +66,9 @@ public class ProfileMenu : MonoBehaviour
|
||||
string customIcon
|
||||
)
|
||||
{
|
||||
var xp = Tools.CalculateXP(BigInteger.Parse(normalBerries), BigInteger.Parse(poisonBerries), BigInteger.Parse(slowBerries), BigInteger.Parse(ultraBerries), BigInteger.Parse(speedyBerries), BigInteger.Parse(coinBerries), BigInteger.Parse(randomBerries), BigInteger.Parse(antiBerries), BigInteger.Parse(goldenBerries));
|
||||
var level = Tools.GetLevelInfo(xp).level;
|
||||
|
||||
normalBerryStat.text = Tools.FormatWithCommas(normalBerries);
|
||||
poisonBerryStat.text = Tools.FormatWithCommas(poisonBerries);
|
||||
slowBerryStat.text = Tools.FormatWithCommas(slowBerries);
|
||||
@@ -75,6 +79,7 @@ public class ProfileMenu : MonoBehaviour
|
||||
antiBerryStat.text = Tools.FormatWithCommas(antiBerries);
|
||||
goldenBerryStat.text = Tools.FormatWithCommas(goldenBerries);
|
||||
coinStat.text = Tools.FormatWithCommas(coins);
|
||||
playerLevelAndXPStat.text = $"Level: {Tools.FormatWithCommas((BigInteger)level)}\nXP: {Tools.FormatWithCommas(xp)}";
|
||||
playerNameText.text = playerName;
|
||||
|
||||
if (customIcon == null)
|
||||
|
||||
Reference in New Issue
Block a user