// Setup stat pairs for like hp/max hp and mana/max mana private void SetupStatPair(PlayerRawStat curStat, PlayerStatWithModifiers maxStat) { curStat.SetMinMax(0, maxStat.GetBaseValue()); //curStat.SetValue(maxStat.GetBaseValue()); maxStat.SetCallback((int maxValue) => curStat.SetMinMax(0, maxValue)); //maxStat.divisor = 3; }
public void UpdateUIValues() { this.value = theStat.GetBaseValue(); this.cost = StatLevelHelpers.GetCostToLevelUpStat(theStat.growth, theStat.divisor); text.SetText(theStat.stat.ToString() + ": " + this.value + " | " + "COST: " + this.cost); if (this.playerStats.statPoints < this.cost) { this.button.interactable = false; } else { this.button.interactable = true; } }