SkeletonAnimation.lua 1009 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. class "SkeletonAnimation"
  2. function SkeletonAnimation:SkeletonAnimation(...)
  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.SkeletonAnimation(unpack(arg))
  12. end
  13. end
  14. function SkeletonAnimation:addBoneTrack(boneTrack)
  15. local retVal = Polycore.SkeletonAnimation_addBoneTrack(self.__ptr, boneTrack.__ptr)
  16. end
  17. function SkeletonAnimation:getName()
  18. local retVal = Polycore.SkeletonAnimation_getName(self.__ptr)
  19. return retVal
  20. end
  21. function SkeletonAnimation:Play()
  22. local retVal = Polycore.SkeletonAnimation_Play(self.__ptr)
  23. end
  24. function SkeletonAnimation:Stop()
  25. local retVal = Polycore.SkeletonAnimation_Stop(self.__ptr)
  26. end
  27. function SkeletonAnimation:Update()
  28. local retVal = Polycore.SkeletonAnimation_Update(self.__ptr)
  29. end
  30. function SkeletonAnimation:setSpeed(speed)
  31. local retVal = Polycore.SkeletonAnimation_setSpeed(self.__ptr, speed)
  32. end