【跨服切磋】
parent
f4cc4d7df6
commit
cc8974c016
|
@ -50,8 +50,8 @@ local _ViewConfig = {
|
||||||
formationType = FormationTypeDef.JUMPSERVER_HIGHTLADDER,
|
formationType = FormationTypeDef.JUMPSERVER_HIGHTLADDER,
|
||||||
tip = "罗浮争锋阵容:",
|
tip = "罗浮争锋阵容:",
|
||||||
btnType = {
|
btnType = {
|
||||||
-- {name = "挑战", func = 6},
|
{name = "挑战", func = 6},
|
||||||
{name = "切磋", func = 6},
|
{name = "切磋", func = 7},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -172,6 +172,7 @@ function PlayerInfoPopup:OnOpen(playerId, viewType,serverName)
|
||||||
[4] = this.RemoveFromBlackList,
|
[4] = this.RemoveFromBlackList,
|
||||||
[5] = this.GoToBlack,
|
[5] = this.GoToBlack,
|
||||||
[6] = this.JumpServerBattle,
|
[6] = this.JumpServerBattle,
|
||||||
|
[7] = this.JumpServerCrossBattle,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -338,7 +339,6 @@ function this.FormationAdapter(teamInfo)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local len=#teamInfo.PokemonInfos
|
local len=#teamInfo.PokemonInfos
|
||||||
LogError("长度:"..len)
|
|
||||||
if len>0 then
|
if len>0 then
|
||||||
-- this.bgImg.sizeDelta=Vector2.New(900,1024)
|
-- this.bgImg.sizeDelta=Vector2.New(900,1024)
|
||||||
this.pokemonObj:SetActive(true)
|
this.pokemonObj:SetActive(true)
|
||||||
|
@ -416,7 +416,6 @@ function this.RefreshBtnShow()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- 判断该界面类型是否有按钮显示
|
-- 判断该界面类型是否有按钮显示
|
||||||
LogYellow("this._ViewType "..this._ViewType.." "..tostring(not JumpServerManager.GetCurPersonInfo()))
|
|
||||||
if not this._Config or not this._Config.btnType or isNpc then--or (this._ViewType == PLAYER_INFO_VIEW_TYPE.JUPMSERVER and not JumpServerManager.GetCurPersonInfo())
|
if not this._Config or not this._Config.btnType or isNpc then--or (this._ViewType == PLAYER_INFO_VIEW_TYPE.JUPMSERVER and not JumpServerManager.GetCurPersonInfo())
|
||||||
this.boxLine:SetActive(false)
|
this.boxLine:SetActive(false)
|
||||||
this.btnBox:SetActive(false)
|
this.btnBox:SetActive(false)
|
||||||
|
@ -433,6 +432,12 @@ function this.RefreshBtnShow()
|
||||||
this.btnBox:SetActive(true)
|
this.btnBox:SetActive(true)
|
||||||
for index, btn in ipairs(this.btnList) do
|
for index, btn in ipairs(this.btnList) do
|
||||||
btn:SetActive(btnType[index] ~= nil)
|
btn:SetActive(btnType[index] ~= nil)
|
||||||
|
--罗浮争锋时 挑战阶段显示两个按钮 挑战 和 切磋 其他阶段显示 切磋
|
||||||
|
if this._ViewType == PLAYER_INFO_VIEW_TYPE.JUPMSERVER and JumpServerManager.GetHightLadderDatastage() == JumpServer_Stage.Attack then
|
||||||
|
this.btnList[1]:SetActive(true)
|
||||||
|
else
|
||||||
|
this.btnList[1]:SetActive(false)
|
||||||
|
end
|
||||||
if btnType[index] then
|
if btnType[index] then
|
||||||
Util.GetGameObject(btn, "Text"):GetComponent("Text").text = btnType[index].name
|
Util.GetGameObject(btn, "Text"):GetComponent("Text").text = btnType[index].name
|
||||||
Util.AddOnceClick(btn, function()
|
Util.AddOnceClick(btn, function()
|
||||||
|
@ -492,30 +497,35 @@ function this.BeatHim()
|
||||||
this:ClosePanel()
|
this:ClosePanel()
|
||||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.PLAY, this._PlayerData)
|
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.PLAY, this._PlayerData)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 跨服天梯
|
-- 跨服天梯
|
||||||
function this.JumpServerBattle()
|
function this.JumpServerBattle()
|
||||||
|
this:ClosePanel()
|
||||||
|
local JoinRank = ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).JoinRank
|
||||||
|
if not JumpServerManager.GetHightLadderDataEnterable() then
|
||||||
|
PopupTipPanel.ShowTip("本服千战逐胜台前"..JoinRank.."名可以参加")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local JumpPanel = UIManager.GetOpenPanel(UIName.JumpServerHightLadderPanel)
|
||||||
|
if not JumpPanel then return end
|
||||||
|
local curData = JumpServerManager.GetCurPersonInfo()
|
||||||
|
if not curData then return end
|
||||||
|
this:ClosePanel()
|
||||||
|
JumpPanel.BuyVipFun(1,1,function()
|
||||||
|
--直接战斗
|
||||||
|
JumpServerManager.StarFightHightLadder(curData,0,function(msg)
|
||||||
|
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.JUMPSERVER_GIGHTLADDER_MIANFEINUM, 1)--更新特权
|
||||||
|
JumpPanel = UIManager.GetOpenPanel(UIName.JumpServerHightLadderPanel)
|
||||||
|
JumpPanel.RefreshBuyNum()
|
||||||
|
JumpPanel.OnShowPanel()
|
||||||
|
JumpServerManager.SetCurPersonInfo(nil)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
-- 跨服天梯
|
||||||
|
function this.JumpServerCrossBattle()
|
||||||
this:ClosePanel()
|
this:ClosePanel()
|
||||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.JUMPSERVER_HIGHTLADDER,true, this._PlayerData)
|
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.JUMPSERVER_HIGHTLADDER,true, this._PlayerData)
|
||||||
-- local JoinRank = ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).JoinRank
|
|
||||||
-- if not JumpServerManager.GetHightLadderDataEnterable() then
|
|
||||||
-- PopupTipPanel.ShowTip("本服千战逐胜台前"..JoinRank.."名可以参加")
|
|
||||||
-- return
|
|
||||||
-- end
|
|
||||||
-- local JumpPanel = UIManager.GetOpenPanel(UIName.JumpServerHightLadderPanel)
|
|
||||||
-- if not JumpPanel then return end
|
|
||||||
-- local curData = JumpServerManager.GetCurPersonInfo()
|
|
||||||
-- if not curData then return end
|
|
||||||
-- this:ClosePanel()
|
|
||||||
-- JumpPanel.BuyVipFun(1,1,function()
|
|
||||||
-- --直接战斗
|
|
||||||
-- JumpServerManager.StarFightHightLadder(curData,0,function(msg)
|
|
||||||
-- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.JUMPSERVER_GIGHTLADDER_MIANFEINUM, 1)--更新特权
|
|
||||||
-- JumpPanel = UIManager.GetOpenPanel(UIName.JumpServerHightLadderPanel)
|
|
||||||
-- JumpPanel.RefreshBuyNum()
|
|
||||||
-- JumpPanel.OnShowPanel()
|
|
||||||
-- JumpServerManager.SetCurPersonInfo(nil)
|
|
||||||
-- end)
|
|
||||||
-- end)
|
|
||||||
end
|
end
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function PlayerInfoPopup:OnClose()
|
function PlayerInfoPopup:OnClose()
|
||||||
|
|
Loading…
Reference in New Issue