TP = {}
function TP:new(pos, newpos, effect)
return setmetatable({pos = pos, newpos = newpos, effect = effect}, { __index = self })
end
function TP:setNewPos(position)
self.newpos = position
end
function TP:setEffect(efeito)
self.effect = efeito
end
function TP:getNewPos()
return self.newpos
end
var = TP:new({x = 160, y = 54, z = 7}, {x = 180, y = 60, z = 7}, 10)
newpos = var:getNewPos()
print ("is")
for chave, valor in pairs(newpos) do
print (chave, valor)
end
VFAgPSB7fSAKZnVuY3Rpb24gVFA6bmV3KHBvcywgbmV3cG9zLCBlZmZlY3QpIAogICAgcmV0dXJuIHNldG1ldGF0YWJsZSh7cG9zID0gcG9zLCBuZXdwb3MgPSBuZXdwb3MsIGVmZmVjdCA9IGVmZmVjdH0sIHsgX19pbmRleCA9IHNlbGYgfSkgCmVuZCAKZnVuY3Rpb24gVFA6c2V0TmV3UG9zKHBvc2l0aW9uKQogICAgc2VsZi5uZXdwb3MgPSBwb3NpdGlvbiAKZW5kIApmdW5jdGlvbiBUUDpzZXRFZmZlY3QoZWZlaXRvKSAKICAgIHNlbGYuZWZmZWN0ID0gZWZlaXRvIAplbmQKZnVuY3Rpb24gVFA6Z2V0TmV3UG9zKCkKICAgIHJldHVybiBzZWxmLm5ld3BvcyAKZW5kIAogCnZhciA9IFRQOm5ldyh7eCA9IDE2MCwgeSA9IDU0LCB6ID0gN30sIHt4ID0gMTgwLCB5ID0gNjAsIHogPSA3fSwgMTApIApuZXdwb3MgPSB2YXI6Z2V0TmV3UG9zKCkKIApwcmludCAoImlzIikKZm9yIGNoYXZlLCB2YWxvciBpbiBwYWlycyhuZXdwb3MpIGRvCglwcmludCAoY2hhdmUsIHZhbG9yKQplbmQ=