tweaks and bug fixes

This commit is contained in:
Dylan Wilson
2018-06-02 22:30:40 +10:00
parent 35540dd181
commit 511a56d00a
7 changed files with 44 additions and 29 deletions
@@ -12,15 +12,17 @@ namespace Platformer.Systems
public class RenderSystem : EntityProcessingSystem
{
private readonly SpriteBatch _spriteBatch;
private readonly OrthographicCamera _camera;
public RenderSystem(SpriteBatch spriteBatch)
public RenderSystem(SpriteBatch spriteBatch, OrthographicCamera camera)
{
_spriteBatch = spriteBatch;
_camera = camera;
}
protected override void Begin(GameTime gameTime)
{
_spriteBatch.Begin(samplerState: SamplerState.PointClamp);
_spriteBatch.Begin(samplerState: SamplerState.PointClamp, transformMatrix: _camera.GetViewMatrix());
}
protected override void Process(GameTime gameTime, Entity entity)