Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class main : MonoBehaviour {
- public Text txtMoney;
- int money;
- void Start () {
- //txtMoney.text = PlayerPrefs.GetInt("money").ToString();
- }
- void Update () {
- }
- public void clickOnIcon()
- {
- money += 1;
- if (money % 10 == 0) money += 1000;
- txtMoney.text = money.ToString();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement