Exemplo n.º 1
0
        protected override void Initialize()
        {
            Defines.clientBounds = this.Window.ClientBounds;
            //Set up the frames counter
            this.Components.Add(new FPSComponent(this));

            //Set up the bloom post-process effect
            bloomComponent = new BloomComponent(this);
            bloomComponent.Visible = false;
            this.Components.Add(bloomComponent);

            //Set up the console writer.
            //consoleComponent = new ConsoleComponent(clientBounds);

            //Set up the sprite managers
            //playerSpriteManager = new SpriteManagerComponent(this);
            enemySpriteManager = new SpriteManager(this);

            //Set up the players
            //TODO: Only signed in players should be added.
            playerManager = new PlayerManager(this);

            // Check whether if two controllers are currently active (Comment to default to two-player mode)
            // TODO: Add additional check for if the game is currently running or not
            //if (!GamePad.GetState(PlayerIndex.Two).IsConnected)
            //    twoPlayerMode = false;

            // Set up the charge Bar
            chargeBar = new ChargeBar(this);

            // Set up repair powerup
            repairPowerup = new RepairPowerup(this);

            //Set up the particle system manager.
            particleManager = new ParticleManager(this);

            base.Initialize();
        }
        public void Initialize()
        {
            Defines.playersGestures.Clear();
            Defines.playerFusionTriggered.Clear();

            Defines.clientBounds = ScreenManager.Game.Window.ClientBounds;
            //Set up the frames counter
            ScreenManager.Game.Components.Add(new FPSComponent(ScreenManager.Game));
            gameOver = false;

            //Set up the players
            //TODO: Only signed in players should be added.
            playerManager = new PlayerManager(ScreenManager.Game);

            //Set up the particle system manager.
            Defines.particleManager = new ParticleManager(ScreenManager.Game);
        }
        /// <summary>
        /// Initialize the game, after the ScreenManager is set, but not every time
        /// the graphics are reloaded.
        /// </summary>
        public void Initialize()
        {
            Defines.playersGestures.Clear();
            Defines.playerFusionTriggered.Clear();

            Defines.clientBounds = ScreenManager.Game.Window.ClientBounds;
            //Set up the frames counter
            ScreenManager.Game.Components.Add(new FPSComponent(ScreenManager.Game));

            //Set up the bloom post-process effect
            bloomComponent = new BloomComponent(ScreenManager.Game);
            //bloomComponent.Visible = false;
            ScreenManager.Game.Components.Add(bloomComponent);

            // Initialize an instance of the high score screen
            hss = new HighScoreScreen(ScreenManager.Game);

            //Set up the console writer.
            //consoleComponent = new ConsoleComponent(clientBounds);

            //Set up the sprite managers
            //playerSpriteManager = new SpriteManagerComponent(this);
            enemySpriteManager = new SpriteManager(ScreenManager.Game);

            //Set up the players
            //TODO: Only signed in players should be added.
            playerManager = new PlayerManager(ScreenManager.Game);

            // Check whether if two controllers are currently active (Comment to default to two-player mode)
            // TODO: Add additional check for if the game is currently running or not
            //if (!GamePad.GetState(PlayerIndex.Two).IsConnected)
            //    twoPlayerMode = false;

            // Set up powerup manager
            powerupManager = new PowerupManager(ScreenManager.Game);

            // Set up the charge Bar
            chargeBar = new ChargeBar(ScreenManager.Game);

            // Set up repair powerup
               // repairPowerup = new RepairPowerup(ScreenManager.Game);

            //Set up the particle system manager.
            Defines.particleManager = new ParticleManager(ScreenManager.Game);

            gameOver = false;
        }
        public void Initialize()
        {
            //Clear global arrays in case we restart the game
            Defines.playersGestures.Clear();
            Defines.playerFusionTriggered.Clear();

            Defines.clientBounds = ScreenManager.Game.Window.ClientBounds;
            //Set up the frames counter
            ScreenManager.Game.Components.Add(new FPSComponent(ScreenManager.Game));

            // Initialize an instance of the high score screen

            //Set up the sprite managers
            enemySpriteManager = new SpriteManager(ScreenManager.Game);

            //Set up the players
            //TODO: Only signed in players should be added.
            playerManager = new PlayerManager(ScreenManager.Game);

            // Set up powerup manager
            powerupManager = new PowerupManager(ScreenManager.Game);

            // Set up the charge Bar
            chargeBar = new ChargeBar(ScreenManager.Game);

            //Set up the particle system manager.
            Defines.particleManager = new ParticleManager(ScreenManager.Game);
        }