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--; } } }
//启动线程的方法 public void AddBomb(BombData bombData) { bombData.startTime = TimerThread.GetNowTime(); bombDataList.Add(bombData); }