Exemple #1
0
        protected override void Initialize()
        {
            mapTileSheet = new SpriteSheet(Content, GraphicsDevice);
            map = new World(Content, player);
            player = new Player(Content, map);

            base.Initialize();
        }
Exemple #2
0
        public Player(ContentManager content, World map)
        {
            this.map = map;
            texture = content.Load<Texture2D>("images/player");
            playerWidth = (short)texture.Width;
            playerHeight = (short)texture.Height;

            playerRectangle = new Rectangle((int)position.X, (int)position.Y, playerWidth, playerHeight);
        }