コード例 #1
0
 public void initData(int roundCount, int avgScore, int rank, List <JSONObject> rankList, int cdTime)
 {
     avgScoreLb.text   = avgScore + "";
     rankLb.text       = rank + "";
     roundCountLb.text = roundCount + "";
     if (rankList == null || rankList.Count == 0)
     {
         return;
     }
     initLeaderboard(rankList);
     this.cdTime = cdTime;
     curTime     = cdTime;
     if (cdTime == -1)
     {
         cdTimeLb.text = "比赛开始时间: 10:00";
     }
     else if (cdTime == -2)
     {
         cdTimeLb.text = "比赛结束时间: 22:00";
         toggleAwardBtn(false);
     }
     else
     {
         cdTimeLb.text = "比赛开始倒计时: [e3371b]" + EginTools.miao2TimeStr(curTime, true, true) + "[-]";
         if (IsInvoking("cdInvoke"))
         {
             CancelInvoke("cdInvoke");
         }
         InvokeRepeating("cdInvoke", 0.1f, 1.0f);
     }
 }
コード例 #2
0
 private void invokeCD()
 {
     if (cd == 0)
     {
         CancelInvoke("invokeCD");
         if (PlatformGameDefine.game.GameTypeIDs == "9")            //日赛
         {
             for (int i = 0; i < 6; i++)
             {
                 dailyCountDownLbs[i].text = "0";
             }
         }
         else
         {
             countDownLb.text = "0";
         }
     }
     else
     {
         if (PlatformGameDefine.game.GameTypeIDs == "9")            //日赛
         {
             string fixTime = EginTools.miao2TimeStr(cd, true, true).Replace(":", "");
             char[] charAry = fixTime.ToCharArray();
             for (int i = 0; i < 6; i++)
             {
                 dailyCountDownLbs[i].text = charAry[i].ToString();
             }
         }
         else
         {
             countDownLb.text = EginTools.miao2TimeStr(cd);
         }
         cd--;
     }
 }
コード例 #3
0
 private void cdInvoke()
 {
     if (curTime <= 0)
     {
         curTime = 0;
         CancelInvoke("cdInvoke");
     }
     cdTimeLb.text = "比赛开始倒计时: [e3371b]" + EginTools.miao2TimeStr(curTime, true, true) + "[-]";
     curTime      -= 1;
 }
コード例 #4
0
//	public void reliveOk()
//	{
//
//	}
//
//	public void reliveCancel()
//	{
//
//	}

    private void repeatingCD()
    {
        if (cd <= 0)
        {
            CancelInvoke("repeatingCD");
            timeout();
        }
        cdTimeLb.text = EginTools.miao2TimeStr(cd, true, true).Substring(3);
        cd--;
    }
コード例 #5
0
 private void finalCDInvoke()
 {
     if (finalTimeStart <= 0)
     {
         finalTimeStart = 0;
         CancelInvoke("finalCDInvoke");
         isFinalVS = true;
     }
     countDownFinal.text = EginTools.miao2TimeStr(finalTimeStart, true, true);
     finalTimeStart     -= 1;
 }
コード例 #6
0
 private void invokeScorePlus()
 {
     if (scorePlusTime <= 0)
     {
         scorePlusTime = 0;
         CancelInvoke("invokeScorePlus");
         int nowScore = int.Parse(scoreLb.text);
         scoreLb.text = nowScore * 2 + "";
     }
     countDownMul.text = EginTools.miao2TimeStr(scorePlusTime, true, true);
     scorePlusTime    -= 1;
 }