摘要:
自己看吧:Base = {x = 0,y = 0} ---原型表Base.name = "luohai"Base.age = 22Base.sex = "man"Base.new = function(self) local ower = {} --创建新表 setmetatable(ower,self) --新表的元表设置为原型表 self.__index = self ----原型表的__index为原型表 return owerendBase.setXY = function(self,x,y) self.x = x; ... 阅读全文
posted @ 2014-02-13 17:06
lh92lxm
阅读(359)
评论(0)
推荐(0)