SceneManager.lua 907 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. class "SceneManager"
  2. function SceneManager:SceneManager(...)
  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.SceneManager(unpack(arg))
  12. end
  13. end
  14. function SceneManager:addScene(newScene)
  15. local retVal = Polycore.SceneManager_addScene(self.__ptr, newScene.__ptr)
  16. end
  17. function SceneManager:Update()
  18. local retVal = Polycore.SceneManager_Update(self.__ptr)
  19. end
  20. function SceneManager:UpdateVirtual()
  21. local retVal = Polycore.SceneManager_UpdateVirtual(self.__ptr)
  22. end
  23. function SceneManager:removeScene(scene)
  24. local retVal = Polycore.SceneManager_removeScene(self.__ptr, scene.__ptr)
  25. end
  26. function SceneManager:registerRenderTexture(r_enderTexture)
  27. local retVal = Polycore.SceneManager_registerRenderTexture(self.__ptr, r_enderTexture.__ptr)
  28. end