| 1234567891011121314151617181920212223242526272829303132 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class ShowGameTime : MonoBehaviour
- {
- [SerializeField] Text playTimeText;
- const long PayTimeCountDown = 60 * 1000;
- private void Start()
- {
- //StandaloneAPI.StartGameTimeCountDown();
- }
- // Update is called once per frame
- void Update()
- {
- StandaloneAPI.DoGameTimeCountDown();
- playTimeText.text = string.Format("Ê£Óàʱ¼ä{0}", GetTimeStr());
- }
- string GetTimeStr()
- {
- long second = StandaloneAPI.GetGameTimeCountDown() / 1000;
- long minute = second / 60;
- second = second % 60;
- string str = second + "Ãë";
- if (minute > 0) str = minute + "·Ö" + str;
- return str;
- }
- }
|