Exemple #1
0
        private void DrawStandardPiece(int boardX, int boardY, int pixelX, int pixelY, SpriteBatch spriteBatch)
        {
            // Render game piece on top of background
            Rectangle rect = GamePiece.CalculateScreenRenderDestinationRectangle(pixelX, pixelY);

            spriteBatch.Draw(_playingPieces, rect, _gameBoard.GetPieceRectangle(boardX, boardY), Color.White);
        }
Exemple #2
0
        private void DrawFadingPiece(int pixelX, int pixelY, string pieceName, SpriteBatch spriteBatch)
        {
            FadingPiece p    = _gameBoard.GetFadingPiece(pieceName);
            Rectangle   rect = GamePiece.CalculateScreenRenderDestinationRectangle(pixelX, pixelY);

            spriteBatch.Draw(_playingPieces, rect, p.GetSoruceRect(), Color.White * p.AlphaLevel);
        }
Exemple #3
0
        private void DrawEmptyPiece(int pixelX, int pixelY, SpriteBatch spriteBatch)
        {
            // Render background empty piece
            Rectangle rect = GamePiece.CalculateScreenRenderDestinationRectangle(pixelX, pixelY);

            spriteBatch.Draw(_playingPieces, rect, _emptyPieceTileSheetReferenceSource, Color.White);
        }