diff --git a/content/pong/draw_paddle/texture_renderer.md b/content/pong/draw_paddle/texture_renderer.md index 45e9013..5485199 100644 --- a/content/pong/draw_paddle/texture_renderer.md +++ b/content/pong/draw_paddle/texture_renderer.md @@ -52,11 +52,11 @@ namespace PongFE.Renderers { public class Texture2DRenderer : Renderer { - private readonly SpriteBatch _spriteBatch; + private SpriteBatch SpriteBatch { get; } public Texture2DRenderer(SpriteBatch spriteBatch) { - _spriteBatch = spriteBatch; + SpriteBatch = spriteBatch; } public override void Render(double dt, double alpha) @@ -68,7 +68,7 @@ namespace PongFE.Renderers ref readonly var positionComponent = ref GetComponent(entity); ref readonly var textureComponent = ref GetComponent(entity); - _spriteBatch.Draw( + SpriteBatch.Draw( textureComponent.Texture, positionComponent.Position, null, @@ -130,7 +130,7 @@ Now we can rewrite our SpriteBatch draw call: using PongFE.Extensions; ... - _spriteBatch.Draw( + spriteBatch.Draw( textureComponent.Texture, positionComponent.Position.ToXNAVector(), null,