mirror of
https://github.com/tanema/light_world.lua.git
synced 2024-12-24 20:24:19 +00:00
added light:move(x, y, z)
This commit is contained in:
parent
d81a656812
commit
40f18cae9b
@ -47,6 +47,19 @@ function light:setPosition(x, y, z)
|
||||
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
|
||||
function light:getPosition()
|
||||
return self.x, self.y, self.z
|
||||
|
Loading…
Reference in New Issue
Block a user