_hx_static_to_instance.lua 275 B

12345678910111213
  1. _hx_staticToInstance = function (tab)
  2. return setmetatable({}, {
  3. __index = function(t,k)
  4. if type(rawget(tab,k)) == 'function' then
  5. return function(self,...)
  6. return rawget(tab,k)(...)
  7. end
  8. else
  9. return rawget(tab,k)
  10. end
  11. end
  12. })
  13. end