コード例 #1
0
ファイル: UIPVPGamePage.cs プロジェクト: TheCrowd/Mobilegame
        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();
            }
        }
コード例 #2
0
        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);
            }
        }