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;// */ } }