lua-users home
lua-l archive

Re: Inheriting from a userdata object

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Would this work in your setup?
local game_wrapper_mt = {
 __index = function (t,k)
 local f = game[k]
 return function(self, ...)
 return f(game, ...)
 end
 end,
}
-- 
Gé

AltStyle によって変換されたページ (->オリジナル) /