大家好,我做了这个功能,称为每一帧。-您认为这是保存性能的好方法,还是有更好的方法? private void GetCurrentTime(){ m_TimeNow = System.Convert.ToString(System.DateTime.Now); //If the previous time is not equals to the current time (without seconds = every minute) if (m_PreTime != m_TimeNow.Remove(14)) { //Change the Time displayed on the screen: m_PreTime = m_TimeNow.Remove(14); //1. Copy current Time m_Times = m_TimeNow.Split(' '); //2. Split to following parts m_Time = m_Times[1].Remove(4); //3. Cutout seconds m_Text_Time.text = m_Time + " " + m_Times[2]; //4. And change UI-Text: Time + AM/PM }}此函数称为每帧,将在移动android设备上。
1 回答
- 1 回答
- 0 关注
- 133 浏览
添加回答
举报
0/150
提交
取消