- Home /
Question by
Armadillq_ · Apr 16, 2018 at 06:07 PM ·
textint
Take an int from text and equal it to another text
I'm trying to take a number from moneytext and move it onto other text (vaulttext) so I can clear the moneytext. Currently the number doesn't transfer to the other text. Thanks for your help.
public class VaultScript : MonoBehaviour {
public TextMeshProUGUI VaultBalance;
public TextMeshProUGUI MoneyBalance;
public int MoneyBalanceint;
public GameObject Vault;
public static int score;
public void Start()
{
}
public void OnMouseDown()
{ MoneyBalance.text = score.ToString();
VaultBalance.text = score.ToString();
MoneyBalance.text = ("$0");
score = (0);
Debug.Log("Money Deposited");
}
}
Comment