mirror of
https://github.com/tanema/light_world.lua.git
synced 2024-12-24 20:24:19 +00:00
Merge pull request #13 from Guard13007/master
added move function to lights
This commit is contained in:
commit
bebeba9d5e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user