private void OnAnyBombDetonated() { BombData bombData = InvoiceData.GetBombDataForBomb(GetInstanceID()); if (bombData == null || bombData.Complete) { return; } bombData.RealWorldEndTime = DateTime.Now; bombData.EndRemainingTime = Mathf.Max(Timer.TimeRemaining, 0.0f); //Because a bomb can end by timer w/o strike as well, so need to check that edge case. if (Timer.TimeRemaining <= 0.0f) { bombData.EndStrikesCount = InternalBomb.NumStrikes; } else { bombData.EndStrikesCount = InternalBomb.NumStrikes + 1; } bombData.SolvedModuleCount = InternalBomb.GetSolvedComponentCount(); bombData.Complete = true; }
private void OnBombTimerStart() { BombData bombData = InvoiceData.GetBombDataForBomb(GetInstanceID()); if (bombData == null) { return; } bombData.RealWorldStartTime = DateTime.Now; }
private void OnAnyBombSolved() { BombData bombData = InvoiceData.GetBombDataForBomb(GetInstanceID()); if (bombData == null || bombData.Complete || !InternalBomb.IsSolved()) { return; } bombData.RealWorldEndTime = DateTime.Now; bombData.EndRemainingTime = Mathf.Max(Timer.TimeRemaining, 0.0f); bombData.EndStrikesCount = InternalBomb.NumStrikes; bombData.SolvedModuleCount = InternalBomb.GetSolvedComponentCount(); bombData.Complete = true; }
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; }