2
0

SceneSound.lua 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. require "Polycode/Entity"
  2. class "SceneSound" (Entity)
  3. function SceneSound:SceneSound(...)
  4. local arg = {...}
  5. if type(arg[1]) == "table" and count(arg) == 1 then
  6. if ""..arg[1].__classname == "Entity" then
  7. self.__ptr = arg[1].__ptr
  8. return
  9. end
  10. end
  11. for k,v in pairs(arg) do
  12. if type(v) == "table" then
  13. if v.__ptr ~= nil then
  14. arg[k] = v.__ptr
  15. end
  16. end
  17. end
  18. if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
  19. self.__ptr = Polycode.SceneSound(unpack(arg))
  20. end
  21. end
  22. function SceneSound:Update()
  23. local retVal = Polycode.SceneSound_Update(self.__ptr)
  24. end
  25. function SceneSound:Clone(deepClone, ignoreEditorOnly)
  26. local retVal = Polycode.SceneSound_Clone(self.__ptr, deepClone, ignoreEditorOnly)
  27. if retVal == nil then return nil end
  28. local __c = _G["Entity"]("__skip_ptr__")
  29. __c.__ptr = retVal
  30. return __c
  31. end
  32. function SceneSound:applyClone(clone, deepClone, ignoreEditorOnly)
  33. local retVal = Polycode.SceneSound_applyClone(self.__ptr, clone.__ptr, deepClone, ignoreEditorOnly)
  34. end
  35. function SceneSound:isDirectionalSound()
  36. local retVal = Polycode.SceneSound_isDirectionalSound(self.__ptr)
  37. return retVal
  38. end
  39. function SceneSound:setDirectionalSound(val)
  40. local retVal = Polycode.SceneSound_setDirectionalSound(self.__ptr, val)
  41. end
  42. function SceneSound:getSound()
  43. local retVal = Polycode.SceneSound_getSound(self.__ptr)
  44. if retVal == nil then return nil end
  45. local __c = _G["Sound"]("__skip_ptr__")
  46. __c.__ptr = retVal
  47. return __c
  48. end
  49. function SceneSound:setLoopOnLoad(val)
  50. local retVal = Polycode.SceneSound_setLoopOnLoad(self.__ptr, val)
  51. end
  52. function SceneSound:getLoopOnLoad()
  53. local retVal = Polycode.SceneSound_getLoopOnLoad(self.__ptr)
  54. return retVal
  55. end
  56. function SceneSound:__delete()
  57. if self then Polycode.delete_SceneSound(self.__ptr) end
  58. end