12345678910111213141516171819202122232425 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class LoadingView : MonoBehaviour {
- private UnityEngine.UI.Text mText;
- private float shengyushijian;
- private void Awake()
- {
- mText = this.GetComponentInChildren<UnityEngine.UI.Text>();
- }
- private void OnEnable()
- {
- shengyushijian = 3f;
- }
- // Update is called once per frame
- void Update () {
- shengyushijian -= Time.deltaTime;
- if(mText != null)
- mText.text = ""+ Mathf.Floor(Mathf.Max(0, shengyushijian));
- }
- }
|