コード例 #1
0
 public void Update()
 {
     for (int i = 0; i < bombDataList.Count; i++)
     {
         if (TimerThread.GetNowTime() - bombDataList[i].startTime >= bombDataList[i].durationTime * 1000)
         {
             SendOpenBomb(bombDataList[i]);
             RemoveBomb(bombDataList[i]);
             i--;
         }
     }
 }
コード例 #2
0
 //启动线程的方法
 public void AddBomb(BombData bombData)
 {
     bombData.startTime = TimerThread.GetNowTime();
     bombDataList.Add(bombData);
 }