代码如下:


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 = 15
	zs1.zhuid = 4  
	self.v_gezi[1] = zs1

    zs2 = {}
	zs2.fenshu = 50
	zs2.zhuid = 8
	self.v_gezi[2] =zs2

end
function GameLogic:getRandPro()
    return 2
end
function GameLogic:getluckPro(gold)
    return 10
end




return GameLogic


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2021-09-19
  • 2021-06-30
  • 2021-07-23
  • 2022-01-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-26
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案