2
0

ScreenParticleEmitter.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. require "Polycode/ScreenEntity"
  2. class "ScreenParticleEmitter" (ScreenEntity)
  3. function ScreenParticleEmitter:ScreenParticleEmitter(...)
  4. for k,v in pairs(arg) do
  5. if type(v) == "table" then
  6. if v.__ptr ~= nil then
  7. arg[k] = v.__ptr
  8. end
  9. end
  10. end
  11. if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
  12. self.__ptr = Polycore.ScreenParticleEmitter(unpack(arg))
  13. end
  14. end
  15. function ScreenParticleEmitter:addParticleBody(particleBody)
  16. local retVal = Polycore.ScreenParticleEmitter_addParticleBody(self.__ptr, particleBody.__ptr)
  17. end
  18. function ScreenParticleEmitter:getBaseMatrix()
  19. local retVal = Polycore.ScreenParticleEmitter_getBaseMatrix(self.__ptr)
  20. if Polycore.__ptr_lookup[retVal] ~= nil then
  21. return Polycore.__ptr_lookup[retVal]
  22. else
  23. Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
  24. Polycore.__ptr_lookup[retVal].__ptr = retVal
  25. return Polycore.__ptr_lookup[retVal]
  26. end
  27. end
  28. function ScreenParticleEmitter:Update()
  29. local retVal = Polycore.ScreenParticleEmitter_Update(self.__ptr)
  30. end