同步操作将从 jzt/UnityFun 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
--http://blog.codingnow.com/cloud/LuaOO-- 保存类类型的虚表local _class = {}function class(super)-- 生成一个类类型local class_type = {}-- 在创建对象的时候自动调用class_type.ctor = falseclass_type.dtor = falseclass_type.super = superclass_type.new = function(...)-- 生成一个类对象local obj = {}obj._class_type = class_type-- 在初始化之前注册基类方法setmetatable(obj, { __index = _class[class_type] })-- 调用初始化方法dolocal createcreate = function(c, ...)if c.super thencreate(c.super, ...)endif c.ctor thenc.ctor(obj, ...)endendcreate(class_type, ...)end-- 注册一个delete方法,调用时执行dtorobj.delete = function(self)local now_super = self._class_typewhile now_super ~= nil doif now_super.dtor thennow_super.dtor(self)endnow_super = now_super.superendendreturn objendlocal vtbl = {}_class[class_type] = vtblsetmetatable(class_type, {__newindex =function(t,k,v)vtbl[k] = vend,__index = vtbl, --For call parent method})if super thensetmetatable(vtbl, {__index =function(t,k)local ret = _class[super][k]--do not do accept, make hot update work right!--vtbl[k] = retreturn retend})endreturn class_typeend
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。