QuaternionTween.lua 786 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. require "Polycode/Tween"
  2. class "QuaternionTween" (Tween)
  3. function QuaternionTween:QuaternionTween(...)
  4. if type(arg[1]) == "table" and count(arg) == 1 then
  5. if ""..arg[1]:class() == "Tween" then
  6. self.__ptr = arg[1].__ptr
  7. return
  8. end
  9. end
  10. for k,v in pairs(arg) do
  11. if type(v) == "table" then
  12. if v.__ptr ~= nil then
  13. arg[k] = v.__ptr
  14. end
  15. end
  16. end
  17. if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
  18. self.__ptr = Polycore.QuaternionTween(unpack(arg))
  19. Polycore.__ptr_lookup[self.__ptr] = self
  20. end
  21. end
  22. function QuaternionTween:updateCustomTween()
  23. local retVal = Polycore.QuaternionTween_updateCustomTween(self.__ptr)
  24. end
  25. function QuaternionTween:__delete()
  26. Polycore.__ptr_lookup[self.__ptr] = nil
  27. Polycore.delete_QuaternionTween(self.__ptr)
  28. end