Пример #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // 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
            //  changing the back buffer size changes the window size (when in windowed mode)
            graphics.PreferredBackBufferWidth  = 1024;
            graphics.PreferredBackBufferHeight = 660;
            graphics.ApplyChanges();
            // on charge un objet mur
            mur  = new ObjetAnime(Content.Load <Texture2D>("mur"), new Vector2(0f, 0f), new Vector2(20f, 20f));
            bean = new ObjetAnime(Content.Load <Texture2D>("bean"), new Vector2(0f, 0f), new Vector2(20f, 20f));
        }
Пример #2
0
 protected override void LoadContent()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     entity = new ObjetAnime(Game.Content.Load<Texture2D>(textures[1]), positionInit, new Vector2(SIZE, SIZE));
     base.LoadContent();
 }
Пример #3
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     //  changing the back buffer size changes the window size (when in windowed mode)
     graphics.PreferredBackBufferWidth = 960;
     graphics.PreferredBackBufferHeight = 620;
     graphics.ApplyChanges();
     // on charge un objet mur
     mur = new ObjetAnime(Content.Load<Texture2D>("Images\\mur"), new Vector2(0f, 0f), new Vector2(20f, 20f));
     bean = new ObjetAnime(Content.Load<Texture2D>("Images\\bean"), new Vector2(0f, 0f), new Vector2(20f, 20f));
     booster = new ObjetAnime(Content.Load<Texture2D>("Images\\gros_bean"), new Vector2(0f, 0f), new Vector2(20f, 20f));
     textFont = Content.Load<SpriteFont>("aFont");
     pacmanDeadSound = Content.Load<SoundEffect>("Musiques\\PacmanEaten");
     eatBeanSound = Content.Load<SoundEffect>("Musiques\\PelletEat1");
     pacmanInvicibleSound = Content.Load<SoundEffect>("Musiques\\Invincible");
 }