miduo_client/Assets/ManagedResources/~Lua/Modules/YuJianXing/YuJianXingManager.lua

60 lines
1.3 KiB
Lua
Raw Normal View History

2021-09-29 18:34:54 +08:00
YuJianXingManager = {}
local this = YuJianXingManager
local riceCtrl = require("Modules/YuJianXing/RiceCtrlView")
local bgList = {"y_yujianxing_bg","y_yujianxing_bg","y_yujianxing_bg","y_yujianxing_bg"}
function this.Initialize()
this.curState = 0 --当前比赛状态
this.nextSession = 0 --当前比赛场次
this.curRankId = 0 --当前排行剧本Id
this.curRecordList = 0 --当前纪录数据
this.curBetList = 0 --当前竞猜数据
end
2021-10-08 15:45:28 +08:00
--初始化地图
function this.OpenMap()
if not this.riceCtrl then
this.riceCtrl = riceCtrl:New()
this.riceCtrl:Awake(bgList)
end
if this.timer then
this.timer:Stop()
this.timer = nil
end
end
--销毁地图--正常
function this.CloseMap()
if this.riceCtrl then
this.timer = Timer.New(function ()
this.riceCtrl:Dispose()
this.riceCtrl = nil
end,1)
this.timer:Start()
end
end
--销毁地图--立刻
function this.DestroyMap()
if this.riceCtrl then
this.riceCtrl:Dispose()
this.riceCtrl = nil
end
2021-09-29 18:34:54 +08:00
end
2021-10-08 15:45:28 +08:00
--更新服务器信息
function this.UpdataServerData(msg)
-- body
2021-09-29 18:34:54 +08:00
end
2021-10-08 15:45:28 +08:00
--修改游戏状态
2021-09-29 18:34:54 +08:00
function this.SetGameState(_state)
this.riceCtrl:SetGameState(_state)
end
2021-10-08 15:45:28 +08:00
--重置游戏
function this.ResetGame()
this.riceCtrl:ResetGame()
2021-09-29 18:34:54 +08:00
end
2021-10-08 15:45:28 +08:00
2021-09-29 18:34:54 +08:00
return YuJianXingManager