Example #1
0
        private void RenderWalls(Game.Game game)
        {
            _mapLayout.UpdateFromGame(game);

            for (int y = 0; y < _mapLayout.DisplayHeight; y++)
            {
                for (int x = 0; x < _mapLayout.DisplayWidth; x++)
                {
                    _display.DrawOnBackground(x, y + _boardY, _sprites.Map(_mapLayout.BoardPieceToDisplay(x, y)));
                }
            }
        }
Example #2
0
        public void RenderWalls(Graphics g, NPacMan.Game.Game game)
        {
            _mapLayout.UpdateFromGame(game);
            var cellSize = Sprites.PixelGrid;

            for (int y = 0; y < _mapLayout.DisplayHeight; y++)
            {
                for (int x = 0; x < _mapLayout.DisplayWidth; x++)
                {
                    var posX = x * cellSize;
                    var posY = y * cellSize;
                    _sprites.RenderSprite(g, posX, posY, _sprites.Map(_mapLayout.BoardPieceToDisplay(x, y)));
                }
            }
        }