摘要: lua中使用元表并指定元表的__index来模拟实现了类和对象,下面是一个我觉得比较好用的class方法,用来模拟实现类的继承,这个在我之前的博客中也有提及: function class(classname, super) local cls if type(super) ~= "table" t 阅读全文
posted @ 2021-04-29 10:45 movin2333 阅读(108) 评论(0) 推荐(0) 编辑