This commit is contained in:
midoks
2023-02-12 01:02:19 +08:00
parent b3a0f11a80
commit c0c67095be
3 changed files with 21 additions and 3 deletions
+8
View File
@@ -41,6 +41,14 @@ function _M.new(self)
end
-- function _M.getInstance(self)
-- if rawget(self, "instance") == nil then
-- rawset(self, "instance", self.new())
-- end
-- assert(self.instance ~= nil)
-- return self.instance
-- end
function _M.getInstance(self)
if self.instance == nil then
self.instance = self:new()