void refreshBarInfo() { // todo change to button.getTextMEshPro Component -> set text buyButton.GetComponentInChildren <TextMeshProUGUI>().text = "COST:\n" + NumberFormatter.format(price); Text[] texts = this.GetComponentsInChildren <Text>(); texts[1].text = "Amount: " + amount; // texts[2].text = "Next: +" + NumberFormatter.format(coinIncrease) + "(c)/sec"; }
void Update() { if (totalMoneyPerSec > 0) { totalMoney += multiplier * totalMoneyPerSec * Time.deltaTime; } coinText.text = NumberFormatter.format(totalMoney, 40) + "(c)"; coinPerSecText.text = NumberFormatter.format(totalMoneyPerSec * multiplier, 25) + "(c)/sec"; if (multiplier > 1.1) { multiplierText.text = "Coin Multiplier: " + multiplier.ToString("F1"); } }