fix spritebatch naming
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
6c13f42a90
commit
e844d77d65
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue