/// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            GLOBALS_GAME_RESSOURCES.Initialize();
            GLOBALS_GAME_RESSOURCES.Images[0] = Content.Load <Texture2D>("Images/Shiki1");
            GLOBALS_GAME_RESSOURCES.Images[1] = Content.Load <Texture2D>("Images/Shiki2");
            GLOBALS_GAME_RESSOURCES.Images[2] = Content.Load <Texture2D>("Images/Shiki3");

            //Texture
            GLOBALS_GAME_RESSOURCES.TX_panneauStatut = Content.Load <Texture2D>("Textures/planet-001");
            GLOBALS_GAME_RESSOURCES.TX_panneauTour   = Content.Load <Texture2D>("Textures/paves_32x32");
            GLOBALS_GAME_RESSOURCES.TX_minimap       = Content.Load <Texture2D>("Textures/vert_32x32");
        }
        /// <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
            //

            IsMouseVisible = true;
            GLOBALS_GAME_RESSOURCES.Initialize();
            //Initialisation des parametre de la fenetre
            GLOBALS_GAME_RESSOURCES.GRAPHICS.PreferredBackBufferHeight = 1280;
            GLOBALS_GAME_RESSOURCES.GRAPHICS.PreferredBackBufferWidth  = 1024;
            GLOBALS_GAME_RESSOURCES.GRAPHICS.PreferredBackBufferFormat = SurfaceFormat.Rg32;
            //GLOBALS_GAME_RESSOURCES.GRAPHICS.ToggleFullScreen();
            GLOBALS_GAME_RESSOURCES.GRAPHICS.ApplyChanges();

            base.Initialize();
        }
Example #3
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
            //

            IsMouseVisible = true;

            //Initialisation des parametre de la fenetre
            GLOBALS_GAME_RESSOURCES.GRAPHICS.ToggleFullScreen();
            GLOBALS_GAME_RESSOURCES.GRAPHICS.PreferredBackBufferHeight = GraphicsDevice.DisplayMode.Height;
            GLOBALS_GAME_RESSOURCES.GRAPHICS.PreferredBackBufferWidth  = GraphicsDevice.DisplayMode.Width;
            GLOBALS_GAME_RESSOURCES.GRAPHICS.PreferredBackBufferFormat = SurfaceFormat.Rg32;

            GraphicsDevice.Viewport = new Viewport(0, 0, Window.ClientBounds.Width, Window.ClientBounds.Height);

            GLOBALS_GAME_RESSOURCES.Initialize();

            Window.Title             = "3D Tower";
            Window.AllowUserResizing = true;
            //GraphicsDevice.Viewport = new Viewport(Window.ClientBounds);
            GLOBALS_GAME_RESSOURCES.GRAPHICS.ApplyChanges();

            base.Initialize();
        }