Ejemplo 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()
        {
            // TODO: Add your initialization logic here
            //// Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            ATexture.Load(Content);
            Fonts.Font1 = Content.Load<SpriteFont>("Menu/Fonts/SpriteFont1");//

            stage1 = new Stages.Stage1();
            stage2 = new Stages.Stage2();

            menu = new Menu(stage1, stage2);
            menu.Initialize(this);

            screenWidth = Window.ClientBounds.Width;
            screenHeight = Window.ClientBounds.Height;
            screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);

            hud = new HUD();
            Camerascroll = new Camera(GraphicsDevice.Viewport);

            random = new Random();

            base.Initialize();
        }
Ejemplo n.º 2
0
        float VolumeBGM; // Valeur en f

        #endregion Fields

        #region Constructors

        public Menu(Stages.Stage1 _stage1, Stages.Stage2 _stage2)
        {
            stage1 = _stage1;
            stage2 = _stage2;
        }