Exemplo n.º 1
0
        private void DrawSpritesWithBatcher2D()
        {
            _batcher.Begin(_viewMatrix, _projectionMatrix, effect: _effect);

            // ReSharper disable once ForCanBeConvertedToForeach
            for (var index = 0; index < _sprites.Length; index++)
            {
                var sprite = _sprites[index];
                _batcher.DrawTexture(sprite.Texture, ref sprite.TransformMatrix, sprite.Color);
            }

            _batcher.End();
        }