fork download
  1. TP = {}
  2. function TP:new(pos, newpos, effect)
  3. return setmetatable({pos = pos, newpos = newpos, effect = effect}, { __index = self })
  4. end
  5. function TP:setNewPos(position)
  6. self.newpos = position
  7. end
  8. function TP:setEffect(efeito)
  9. self.effect = efeito
  10. end
  11. function TP:getNewPos()
  12. return self.newpos
  13. end
  14.  
  15. var = TP:new({x = 160, y = 54, z = 7}, {x = 180, y = 60, z = 7}, 10)
  16. newpos = var:getNewPos()
  17.  
  18. print ("is")
  19. for chave, valor in pairs(newpos) do
  20. print (chave, valor)
  21. end
Success #stdin #stdout 0s 2788KB
stdin
Standard input is empty
stdout
is
y	60
x	180
z	7