代码如下:
local GameLogic = {}function GameLogic:new(o) o = o or {} setmetatable(o,self) self.__index = self return o
end function GameLogic:Instance() if self.instance == nil then self.instance = self:new() end print(self.instance)return self.instance
end function GameLogic:init()self.v_gezi = {}zs1 = {}zs1.fenshu = 15zs1.zhuid = 4 self.v_gezi[1] = zs1zs2 = {}zs2.fenshu = 50zs2.zhuid = 8self.v_gezi[2] =zs2end
function GameLogic:getRandPro()return 2
end
function GameLogic:getluckPro(gold)return 10
endreturn GameLogic