示例#1
0
        public void Render(RenderingContext renderingContext)
        {
            var spriteBatch = renderingContext.SpriteBatch;

            spriteBatch.DrawString(_font, $"Score: {Score}", new Vector2(400, 100), Color.White);
            spriteBatch.DrawString(_font, $"Next Piece:", new Vector2(400, 130), Color.White);
            _pieceRenderer.Render(renderingContext, new Vector2(400, 200), NextPiece, new Vector2(20));
        }
示例#2
0
        public void Render(RenderingContext renderingContext)
        {
            var worldPosition = _boardRenderer.ToWorldPosition(_boardEntity.Transform, Position, Vector2.Zero);

            _pieceRenderer.Render(renderingContext, worldPosition, Piece);
        }