Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5.  
  6. public class main : MonoBehaviour {
  7.  
  8.  
  9.     public Text txtMoney;
  10.     int money;
  11.  
  12.     void Start () {
  13.        //txtMoney.text = PlayerPrefs.GetInt("money").ToString();
  14.     }
  15.    
  16.  
  17.     void Update () {
  18.        
  19.     }
  20.  
  21.     public void clickOnIcon()
  22.     {
  23.         money += 1;
  24.         if (money % 10 == 0) money += 1000;
  25.         txtMoney.text = money.ToString();
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement