예제 #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);
            Spritesheet = Content.Load<Texture2D>(@"SpriteSheet");
            pizzaguy = new PizzaGuy(new Vector2(0, 0), Spritesheet, new Rectangle(380, 225, 30, 35), Vector2.Zero);

            // TODO: use this.Content to load your game content here
        }
예제 #2
0
파일: Ghost.cs 프로젝트: hubbercraft/1
 public Ghost(
     Vector2 location,
     Texture2D texture,
     Rectangle initialFrame,
     Vector2 velocity,
     xTile.Layers.Layer map,
     PizzaGuy pacman)
     : base(location, texture, initialFrame, velocity, map)
 {
     this.pacman = pacman;
 }
예제 #3
0
파일: Game1.cs 프로젝트: jluce1996/1
        /// <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);
            Spritesheet = Content.Load<Texture2D>(@"SpriteSheet");
            map = Content.Load<Map>("pacmanmap");
            menuMusic = Content.Load<Song>("introMusic");
            map.LoadTileSheets(xnaDisplayDevice);
            MediaPlayer.Play(menuMusic);

            pizzaguy = new PizzaGuy(new Vector2(32, 32), Spritesheet, new Rectangle(300, 300, 32, 32), Vector2.Zero, map.GetLayer("untitled layer"));
            ghost = new Ghost(new Vector2(32, 32*10), Spritesheet, new Rectangle(500, 300, 32, 32), Vector2.Zero, map.GetLayer("untitled layer"), pizzaguy);

            // TODO: use this.Content to load your game content here
        }
예제 #4
0
파일: Game1.cs 프로젝트: BicBoi/PizzaGuy
        /// <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);
            PacmanSheet = Content.Load<Texture2D>("PacmanSprites");

            pacman = new PizzaGuy(new Vector2(300, 300), PacmanSheet, new Rectangle(114, 13, 38, 39), new Vector2(32,0));
            pacman.AddFrame(new Rectangle(18, 13, 34, 37));
            pacman.AddFrame(new Rectangle(74, 13, 27, 38));
            pacman.AddFrame(new Rectangle(18, 13, 34, 37));
        }