private void OnBombConfigured() { BombData bombData = InvoiceData.GetBombDataForBomb(GetInstanceID()); if (bombData == null) { return; } bombData.RealWorldStartTime = DateTime.Now; bombData.StartRemainingTime = Timer.TimeRemaining; bombData.StartStrikesCount = InternalBomb.NumStrikes; bombData.StrikesToLose = InternalBomb.NumStrikesToLose; bombData.SolvableModuleCount = InternalBomb.GetSolvableComponentCount(); bombData.Started = true; }
internal static BombData GetBombDataForBomb(int bombID) { if (!Enabled) { return(null); } BombData bombData = null; if (_bombProgressLookup.TryGetValue(bombID, out bombData)) { return(bombData); } bombData = new BombData(); _bombProgress.Add(bombData); _bombProgressLookup[bombID] = bombData; return(bombData); }