123456789101112131415161718192021 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class Counter : MonoBehaviour
- {
- public int total;
- private Text txt;
- void Start()
- {
- total =0;
- txt = this.GetComponent<Text>();
- }
- void Update()
- {
- txt.text = total.ToString();
- }
- }
|