Example #1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            SCREEN_WIDTH    = graphics.GraphicsDevice.Viewport.Width;
            SCREEN_HEIGHT   = graphics.GraphicsDevice.Viewport.Height;
            gameAssets      = new GameAssets();
            objectFactory   = new Factory(gameAssets);
            spriteManager   = new SpriteManager();
            spriteBatch     = new SpriteBatch(GraphicsDevice);
            viewPort        = new ViewPort(spriteBatch, SCREEN_WIDTH, SCREEN_HEIGHT);
            colliderHandler = new ColliderHandler();
            gameState       = new Intro();

            currentGameState = -1;

            wave = 1;

            //playGame = new PlayGame(gameAssets, viewPort, objectFactory, colliderHandler);
            //gameState.CurrentGameState = (int)GAME_STATES.PLAY_GAME;

            base.Initialize();
        }
Example #2
0
 public GUI(Factory objectFactory_, ViewPort viewPort_)
 {
     objectFactory = objectFactory_;
     viewPort      = viewPort_;
 }