标签:
直接贴代码
local danli = nil
local classname = class("classname")
function classname:getInstance()
if danli == nil then
danli = classname.new()
end
return danli
end
return classname
使用
local duixiagn = classname:getInstance()
标签:
原文地址:http://www.cnblogs.com/Xiaoshun/p/5032114.html