Merge pull request #13 from Guard13007/master

added move function to lights
This commit is contained in:
Tim Anema 2014-11-11 09:47:17 -05:00
commit bebeba9d5e

View File

@ -47,6 +47,19 @@ function light:setPosition(x, y, z)
end end
end end
-- move position
function light:move(x, y, z)
if x then
self.x = self.x + x
end
if y then
self.y = self.y + y
end
if z then
self.z = self.z + z
end
end
-- get x -- get x
function light:getPosition() function light:getPosition()
return self.x, self.y, self.z return self.x, self.y, self.z