Exemplo n.º 1
0
        /*
         * This method is called at the beginning of each intermission phase. (game phase 2)
         * It counts the number of surviving cities and unspent missiles. It increments the score
         * after counting this. It starts the timer over at 0.
         */
        private void StartIntermission()
        {
            SoundPlayer SP = new SoundPlayer();

            SP.SoundLocation = "sounds/bloop.wav";
            SP.Play();

            roundType = newRand(3);

            flakPoints = cityPoints = 0;

            foreach (Base B in baseArray)
            {
                flakPoints += (B.GetAmmunition());
                B.SpendAll();
            }
            foreach (City C in cityArray)
            {
                if (!C.IsDestroyed())
                {
                    cityPoints += 1;
                }
            }

            score += multiplier * ((flakPoints * 5) + (cityPoints * 100));

            if (score >= newCityBenchmark)
            {
                foreach (City Restore in cityArray)
                {
                    if (Restore.IsDestroyed())
                    {
                        newCityBenchmark += 10000;
                        Restore.Restore();
                    }
                }
            }
            bigTimer = 0;
        }