feat(rect): add getDimensions

This commit is contained in:
Kazhnuz 2021-08-28 15:48:09 +02:00
parent 0ce811fa97
commit 02edc4fc07

View file

@ -67,6 +67,10 @@ function Rect:getRelativeCoordinate(dx, dy)
return dx - self.x, dy - self.y return dx - self.x, dy - self.y
end end
function Rect:getDimensions()
return self.w, self.h
end
function Rect:drawBox() function Rect:drawBox()
utils.graphics.box(self.x, self.y, self.w, self.h) utils.graphics.box(self.x, self.y, self.w, self.h)
end end