【灵脉秘境】提交
parent
336ea6b8d3
commit
a4151f51b2
|
@ -7,7 +7,7 @@ function this.Initialize()
|
||||||
this.startTime = 1637942400
|
this.startTime = 1637942400
|
||||||
this.endTime = 1638115200
|
this.endTime = 1638115200
|
||||||
this.myPlaceId = 3
|
this.myPlaceId = 3
|
||||||
this.rankData = {
|
this.recordData = {
|
||||||
[1] = {playerId = 1,playerName = "我叫1",placeId = 1},
|
[1] = {playerId = 1,playerName = "我叫1",placeId = 1},
|
||||||
[2] = {playerId = 2,playerName = "我叫2",placeId = 2},
|
[2] = {playerId = 2,playerName = "我叫2",placeId = 2},
|
||||||
[3] = {playerId = 3,playerName = "我叫3",placeId = 3},
|
[3] = {playerId = 3,playerName = "我叫3",placeId = 3},
|
||||||
|
@ -48,15 +48,20 @@ end
|
||||||
--获取服务器发来的信息
|
--获取服务器发来的信息
|
||||||
function this.GetLingMaiServerData(msg,func)
|
function this.GetLingMaiServerData(msg,func)
|
||||||
this.state = msg.state
|
this.state = msg.state
|
||||||
this.startTime = msg.state.startTime
|
this.startTime = msg.myOccupyTime
|
||||||
this.endTime = msg.state.endTime
|
-- this.endTime = msg.state.endTime
|
||||||
this.myPlaceId = msg.myPlaceId
|
this.myPlaceId = msg.myOccupyId
|
||||||
this.rankData = msg.rankData
|
this.curPage = lodeConfig[this.myPlaceId].PageNo
|
||||||
this.curPage = lodeConfig[msg.myPlaceId].PageNo
|
|
||||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.LingMaiMiJing.RefreshPanel)
|
-- Game.GlobalEvent:DispatchEvent(GameEvent.LingMaiMiJing.RefreshPanel)
|
||||||
if func then
|
if func then
|
||||||
func()
|
func()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function this.OpenRecord()
|
||||||
|
NetManager.LingMaiRecordRequest(function ()
|
||||||
|
PopupTipPanel.ShowTip("打开纪录")
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
return LingMaiMiJingManager
|
return LingMaiMiJingManager
|
|
@ -46,6 +46,9 @@ function LingMaiMiJingPanel:BindEvent()
|
||||||
Util.AddOnceClick(self.helpBtn, function()
|
Util.AddOnceClick(self.helpBtn, function()
|
||||||
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.LingMaiMiJing,self.helpPosition.x,self.helpPosition.y)
|
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.LingMaiMiJing,self.helpPosition.x,self.helpPosition.y)
|
||||||
end)
|
end)
|
||||||
|
Util.AddOnceClick(self.recordBtn, function()
|
||||||
|
LingMaiMiJingManager.OpenRecord()
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
--添加事件监听(用于子类重写)
|
--添加事件监听(用于子类重写)
|
||||||
|
@ -94,7 +97,7 @@ end
|
||||||
function LingMaiMiJingPanel:SetVeins()
|
function LingMaiMiJingPanel:SetVeins()
|
||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
local go = self.veinList[i]
|
local go = self.veinList[i]
|
||||||
local data = self.data.rankData[i]
|
local data = self.data.recordData[i]
|
||||||
local title = Util.GetGameObject(go,"title/Name"):GetComponent("Text")
|
local title = Util.GetGameObject(go,"title/Name"):GetComponent("Text")
|
||||||
local num = Util.GetGameObject(go,"title/Num"):GetComponent("Text")
|
local num = Util.GetGameObject(go,"title/Num"):GetComponent("Text")
|
||||||
local name = Util.GetGameObject(go,"obtain/name"):GetComponent("Text")
|
local name = Util.GetGameObject(go,"obtain/name"):GetComponent("Text")
|
||||||
|
|
|
@ -6078,5 +6078,49 @@ function NetManager.GetWeekCardReward(id, func)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 灵脉秘境请求界面信息
|
||||||
|
function NetManager.GetLingMaiInfoRequest(_page, func)
|
||||||
|
local data = ArenaInfoProto_pb.CrossLingmaiSecretAreaInfoRequest()
|
||||||
|
data.page = _page
|
||||||
|
local msg = data:SerializeToString()
|
||||||
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.CrossLingmaiSecretAreaInfoRequest, MessageTypeProto_pb.CrossLingmaiSecretAreaInfoResponse, msg, function(buffer)
|
||||||
|
local data = buffer:DataByte()
|
||||||
|
local msg = ArenaInfoProto_pb.CrossLingmaiSecretAreaInfoResponse()
|
||||||
|
msg:ParseFromString(data)
|
||||||
|
LingMaiMiJingManager.GetLingMaiServerData(msg,function ()
|
||||||
|
if func then
|
||||||
|
func(msg)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 灵脉秘境请求战斗
|
||||||
|
function NetManager.LingMaiBattleRequest(_id, func)
|
||||||
|
local data = ArenaInfoProto_pb.CrossLingmaiSecretAreaRequest()
|
||||||
|
data.id = _id
|
||||||
|
local msg = data:SerializeToString()
|
||||||
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.CrossLingmaiSecretAreaRequest, MessageTypeProto_pb.CrossLingmaiSecretAreaResponse, msg, function(buffer)
|
||||||
|
local data = buffer:DataByte()
|
||||||
|
local msg = ArenaInfoProto_pb.CrossLingmaiSecretAreaResponse()
|
||||||
|
msg:ParseFromString(data)
|
||||||
|
if func then
|
||||||
|
func(msg)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 灵脉秘境请求纪录
|
||||||
|
function NetManager.LingMaiRecordRequest(func)
|
||||||
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.CrossLingmaiSecretAreaRecordRequest, MessageTypeProto_pb.CrossLingmaiSecretAreaRecordResponse, nil, function(buffer)
|
||||||
|
local data = buffer:DataByte()
|
||||||
|
local msg = ArenaInfoProto_pb.CrossLingmaiSecretAreaRecordResponse()
|
||||||
|
msg:ParseFromString(data)
|
||||||
|
LingMaiMiJingManager.recordData = msg.recordData
|
||||||
|
if func then
|
||||||
|
func(msg)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
return this
|
return this
|
Loading…
Reference in New Issue