源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
557 B

-- local setmetatable = setmetatable
-- local _slot = {}
-- setmetatable(_slot, _slot)
-- _slot.__call = function(self, ...)
-- if nil == self.obj then
-- return self.func(...)
-- else
-- return self.func(self.obj, ...)
-- end
-- end
-- _slot.__eq = function (lhs, rhs)
-- return lhs.func == rhs.func and lhs.obj == rhs.obj
-- end
-- --可用于 Timer 定时器回调函数. 例如Timer.New(slot(self.func, self))
-- function slot(func, obj)
-- local st = {func = func, obj = obj}
-- setmetatable(st, _slot)
-- return st
-- end