Esempio n. 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()
        {
            QuadNode.limY = (GameParameters.MapScale + 1) * GameParameters.MaxMapHeight;
            projection    = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45),
                                                                GraphicsDevice.Viewport.AspectRatio,
                                                                1,
                                                                FarClippingPlane);
            spriteBatch = new SpriteBatch(GraphicsDevice);
            menu        = new Menu.Menu(this);

            menu.GameComponentsReady += MenuOnGameComponentsReady;
            this.StartLoading();
            base.Initialize();
        }
Esempio n. 2
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()
        {
            QuadNode.limY = (GameParameters.MapScale + 1) * GameParameters.MaxMapHeight;
            projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45),
                                                             GraphicsDevice.Viewport.AspectRatio,
                                                             1,
                                                             FarClippingPlane);
            spriteBatch = new SpriteBatch(GraphicsDevice);
            menu = new Menu.Menu(this);

            menu.GameComponentsReady += MenuOnGameComponentsReady;
            this.StartLoading();
            base.Initialize();
        }