fix spritebatch naming
continuous-integration/drone/push Build is passing Details

main
cosmonaut 2021-05-01 16:09:52 -07:00
parent 6c13f42a90
commit e844d77d65
1 changed files with 4 additions and 4 deletions

View File

@ -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<PositionComponent>(entity);
ref readonly var textureComponent = ref GetComponent<Texture2DComponent>(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,