void Update() { if (m_game != null) { int time = 0; if (m_game.IsTimelimited) { time = m_game.GetRemainTime();//second } else { time = m_game.GetElapsedTime(); } txtTimeInfo.text = TimeUtils.GetTimeString("%hh:%mm:%ss", time); //when game ends, score is reset to 0, in this case do not update if (!GetPlayerScore().Equals("0")) { txtScoreInfo.text = "score:" + GetPlayerScore(); cur_score = GetPlayerScore(); } //update player list UpdatePlayerRank(); } }
void Update() { if (m_game != null) { int time = 0; if (m_game.IsTimelimited) { time = m_game.GetRemainTime(); //second } else { time = m_game.GetElapsedTime(); } txtTimeInfo.text = TimeUtils.GetTimeString("%hh:%mm:%ss", time); } }