摘要: --多重继承local function search(k,plist) for i=1,#plist do local v=plist[i][k] -- 取一个基类 if v then return v end endendfunction createClass(...) local c={}; local parents={...}; setmetatable(c,{__index=function(t,k) return search(k,parents) end } ); c.__index=c; function c:new(o) o=o or {}; setmetat... 阅读全文
posted @ 2013-02-28 15:02 byfei 阅读(158) 评论(0) 推荐(0) 编辑