1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class BiologyGameUI : MRBaseUI
- {
- [SerializeField]
- private Text TimeText;
- [SerializeField]
- private Text ScoreText;
- private string time_format_str = "倒计时 : {0} 秒";
- private string score_format_str = "得分 : {0}";
- protected override void Start()
- {
- base.Start();
- InitScore();
- }
- private void OnDestroy()
- {
-
- }
- private void InitScore()
- {
- RefreshText(0,0);
- }
- public void RefreshText(int time, int score)
- {
- TimeText.text = string.Format(time_format_str, time.ToString());
- ScoreText.text = string.Format(score_format_str, score.ToString());
- /*
- if (this.mData != null)
- this.mData.score = score;//
- */
- }
- }
|