Add getters and setters to VisualObject

This commit is contained in:
Sabine Lim
2023-05-16 02:16:10 +10:00
parent 79e9a14c1c
commit e068c3f09c

View File

@@ -138,10 +138,18 @@ return function(name, basalt)
return x
end,
setX = function(self, newX)
return self:setPosition(newX, y)
end,
getY = function(self)
return y
end,
setY = function(self, newY)
return self:setPosition(x, newY)
end,
getPosition = function(self)
return x, y
end,
@@ -167,10 +175,18 @@ return function(name, basalt)
return height
end,
setHeight = function(self, newHeight)
return self:setSize(width, newHeight)
end,
getWidth = function(self)
return width
end,
setWidth = function(self, newWidth)
return self:setSize(newWidth, height)
end,
getSize = function(self)
return width, height
end,