【灵脉秘境】提交

dev_chengFeng
ZhangBiao 2021-11-11 14:28:02 +08:00
parent db15950d6a
commit d0b2bdd412
3 changed files with 27 additions and 1 deletions

View File

@ -527,4 +527,7 @@ GameEvent = {
UpdateBetTime = "YuJianXing.UpdateBetTime",
EndBetPanel = "YuJianXing.EndBetPanel",
},
LingMaiMiJing = {
RefreshPanel = "LingMaiMiJing.RefreshPanel",
}
}

View File

@ -2,7 +2,27 @@ LingMaiMiJingManager = {}
local this = LingMaiMiJingManager
function this.Initialize()
this.state = 1
this.startTime = 1636601615
this.endTime = 1636646400
this.myPlaceId = 3
this.rankData = {
[1] = {playerId = 1,playerName = "我叫1",placeId = 1},
[2] = {playerId = 2,playerName = "我叫2",placeId = 2},
[3] = {playerId = 3,playerName = "我叫3",placeId = 3},
[4] = {playerId = 4,playerName = "我叫4",placeId = 4},
[5] = {playerId = 5,playerName = "我叫5",placeId = 5},
}
end
--获取服务器发来的信息
function this.GetLingMaiServerData(msg)
this.state = msg.state
this.startTime = msg.state.startTime
this.endTime = msg.state.endTime
this.myPlaceId = msg.myPlaceId
this.rankData = msg.rankData
Game.GlobalEvent:DispatchEvent(GameEvent.LingMaiMiJing.RefreshPanel)
end
return LingMaiMiJingManager

View File

@ -22,15 +22,17 @@ end
--添加事件监听(用于子类重写)
function LingMaiMiJingPanel:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.LingMaiMiJing.RefreshPanel, self.Refresh,self)
end
--移除事件监听(用于子类重写)
function LingMaiMiJingPanel:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.LingMaiMiJing.RefreshPanel, self.Refresh,self)
end
--跨服
function LingMaiMiJingPanel:OnOpen()
self.UpView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.QiJie})
self.UpView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main})
end
--界面打开时调用(用于子类重写)
@ -39,6 +41,7 @@ function LingMaiMiJingPanel:OnShow()
end
function LingMaiMiJingPanel:Refresh()
LogYellow("刷新了一次")
end
--界面关闭时调用(用于子类重写)