TweenManager.lua 556 B

123456789101112131415161718192021222324252627282930
  1. class "TweenManager"
  2. function TweenManager:TweenManager(...)
  3. for k,v in pairs(arg) do
  4. if type(v) == "table" then
  5. if v.__ptr ~= nil then
  6. arg[k] = v.__ptr
  7. end
  8. end
  9. end
  10. if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
  11. self.__ptr = Polycore.TweenManager(unpack(arg))
  12. Polycore.__ptr_lookup[self.__ptr] = self
  13. end
  14. end
  15. function TweenManager:addTween(tween)
  16. local retVal = Polycore.TweenManager_addTween(self.__ptr, tween.__ptr)
  17. end
  18. function TweenManager:Update()
  19. local retVal = Polycore.TweenManager_Update(self.__ptr)
  20. end