Add getters and setters to VisualObject
This commit is contained in:
@@ -138,10 +138,18 @@ return function(name, basalt)
|
|||||||
return x
|
return x
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
setX = function(self, newX)
|
||||||
|
return self:setPosition(newX, y)
|
||||||
|
end,
|
||||||
|
|
||||||
getY = function(self)
|
getY = function(self)
|
||||||
return y
|
return y
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
setY = function(self, newY)
|
||||||
|
return self:setPosition(x, newY)
|
||||||
|
end,
|
||||||
|
|
||||||
getPosition = function(self)
|
getPosition = function(self)
|
||||||
return x, y
|
return x, y
|
||||||
end,
|
end,
|
||||||
@@ -167,10 +175,18 @@ return function(name, basalt)
|
|||||||
return height
|
return height
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
setHeight = function(self, newHeight)
|
||||||
|
return self:setSize(width, newHeight)
|
||||||
|
end,
|
||||||
|
|
||||||
getWidth = function(self)
|
getWidth = function(self)
|
||||||
return width
|
return width
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
setWidth = function(self, newWidth)
|
||||||
|
return self:setSize(newWidth, height)
|
||||||
|
end,
|
||||||
|
|
||||||
getSize = function(self)
|
getSize = function(self)
|
||||||
return width, height
|
return width, height
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in New Issue
Block a user