示例#1
0
        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;
        }
示例#2
0
        private void OnBombTimerStart()
        {
            BombData bombData = InvoiceData.GetBombDataForBomb(GetInstanceID());

            if (bombData == null)
            {
                return;
            }

            bombData.RealWorldStartTime = DateTime.Now;
        }
示例#3
0
        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;
        }
示例#4
0
        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;
        }