Added check for invalid parameters.

This commit is contained in:
Harrison Deng 2019-03-09 00:54:41 -06:00
parent 775e04fffa
commit ce2f402153

View File

@ -111,6 +111,8 @@ namespace RecrownedAthenaeum.SpecialTypes
/// <param name="origin">Not considered for 9patches.</param>
public void Draw(SpriteBatch spriteBatch, Rectangle destination, Color color, float rotation = 0, Vector2 origin = default(Vector2))
{
if (rotation != 0) throw new NotImplementedException("Ninepatches can't be rotated.");
if (origin != default(Vector2)) throw new NotImplementedException("Ninepatches can't have origin changed (hint: use the destination rectangle to shift and position).");
Draw(spriteBatch, destination, color);
}
}