Esempio n. 1
0
        void startNewSinglePlayerGame(bool nuxMode)
        {
            returnToGameSelected = false;
            quitToMenuSelected = false;
            quitToDesktopSelected = false;

            damageIndicators = new List<FloatingText>();

            preySpawner = new PreySpawner();
            PreySpawner.resetSpawnQueues();
            isTwoPlayer = false;

            singlePlayerVictory = false;

            if (nuxMode)
                WyrmPlayer.nuxMode = true;
            else
                WyrmPlayer.nuxMode = false;

            WyrmPlayer.LoadContent(Content);

            theWyrmPlayer = new WyrmPlayer();

            theBackground = new Background(t2dbackgroundSinglePlayer, t2dforegroundSinglePlayer);

            Prey.reInitializeAll();
            bullets = new List<Bullet>();

            explosions = new List<Explosion>();

            m_gameStarted = true;
            currWave = 1;

            levelPrey = new List<List<int>>();
            numWaves = 0;

            makeLevels();

            elapsedTimeGameEnd = 0;

            regenCost = DEFAULT_REGEN_COST;
            digSpeedCost = DEFAULT_DIGSPEED_COST;
            staminaCost = DEFAULT_STAMINA_COST;
            maxHealthCost = DEFAULT_MAXHEALTH_COST;

            startNewWave(currWave - 1);
        }
Esempio n. 2
0
        void startNewMultiPlayerGame()
        {
            //MediaPlayer.Volume = 0.25f;     // Reduce volume so we can hear the missle blast
            returnToGameSelected = false;
            quitToMenuSelected = false;
            quitToDesktopSelected = false;

            damageIndicators = new List<FloatingText>();

            preySpawner = new PreySpawner();
            PreySpawner.resetSpawnQueues();
            isTwoPlayer = true;

            singlePlayerVictory = false;
            p2WyrmVictory = false;
            p2HumanVictory = false;

            p2CanUpgradeRegen = true;
            p2CanUpgradeHealth = true;
            p2CanUpgradeSpeed = true;
            p2CanUpgradeSprint = true;

            theBackground = new Background(t2dbackgroundTwoPlayer, t2dforegroundTwoPlayer);

            m_gameStarted = true;

            //Add the wyrm head segment texture to the wyrm textures list
            List<Texture2D> wyrmTextures = new List<Texture2D>();

            WyrmPlayer.nuxMode = false;

            WyrmPlayer.LoadContent(Content);

            theWyrmPlayer = new WyrmPlayer();

            missileDownInstance.Play();

            explosions = new List<Explosion>();

            Prey.reInitializeAll();
            bullets = new List<Bullet>();
            Building.reInitializeAll();

            theHumanPlayer = new HumanPlayer(theWyrmPlayer);

            elapsedTimeGameEnd = 0;

            HumanPlayer.hasFactory = false;
            HumanPlayer.hasBarracks = false;
            HumanPlayer.incomeAdjustmentPerOilDerrick = HumanPlayer.DEFAULT_INCOME_ADJUSTMENT_PER_OIL_DERRICK;    //Reset the oil derrick to the default

            regenCost = DEFAULT_REGEN_COST;
            digSpeedCost = DEFAULT_DIGSPEED_COST;
            staminaCost = DEFAULT_STAMINA_COST;
            maxHealthCost = DEFAULT_MAXHEALTH_COST;
        }