* Draw sprite at given position rotated by [rotation] degrees
*/
@JvmOverloads
-fun SpriteBatch.draw(sprite: Sprite, x: Float, y: Float, rotation: Float = 0f) {
+fun SpriteBatch.drawSprite(
+ sprite: Sprite,
+ x: Float,
+ y: Float,
+ rotation: Float = 0f
+) {
sprite.rotation = rotation
sprite.setPosition(x, y)
sprite.draw(this)
}
+
+fun Sprite.applyOrigin(origin: SpriteOrigin) {
+ origin.applyToSprite(this)
+}
\ No newline at end of file