Naming change.

This commit is contained in:
Harrison Deng 2019-01-13 00:12:55 -06:00
parent edd2e94a6a
commit 1070deb193

View File

@ -9,19 +9,19 @@ using System.Threading.Tasks;
namespace RecrownedAthenaeum.Render namespace RecrownedAthenaeum.Render
{ {
public class RectangleBatch : IDisposable public class RectangleRenderer : IDisposable
{ {
public readonly PrimitiveBatch primitiveBatch; public readonly PrimitiveBatch primitiveBatch;
private bool disposed; private bool disposed;
private bool began; private bool began;
private bool filling; private bool filling;
public RectangleBatch(PrimitiveBatch primitiveBatch) public RectangleRenderer(PrimitiveBatch primitiveBatch)
{ {
this.primitiveBatch = primitiveBatch; this.primitiveBatch = primitiveBatch;
} }
public RectangleBatch(GraphicsDevice graphicsDevice, Camera2D camera) : this(new PrimitiveBatch(graphicsDevice, camera, 4)) public RectangleRenderer(GraphicsDevice graphicsDevice, Camera2D camera) : this(new PrimitiveBatch(graphicsDevice, camera, 4))
{ {
} }
@ -53,7 +53,7 @@ namespace RecrownedAthenaeum.Render
/// <param name="height">Height of rectangle.</param> /// <param name="height">Height of rectangle.</param>
/// <param name="color">Color of all vertices of this rectangle.</param> /// <param name="color">Color of all vertices of this rectangle.</param>
/// <param name="rotation">Rotation of rectangle. Default is 0 radians.</param> /// <param name="rotation">Rotation of rectangle. Default is 0 radians.</param>
public void Rectangle(int x, int y, int width, int height, Color color, double rotation = 0) public void DrawRectangle(int x, int y, int width, int height, Color color, double rotation = 0)
{ {
if (disposed) throw new ObjectDisposedException(GetType().Name); if (disposed) throw new ObjectDisposedException(GetType().Name);
if (!began) throw new InvalidOperationException("Renderer must be started by calling Begin."); if (!began) throw new InvalidOperationException("Renderer must be started by calling Begin.");