Merge branch '0功能/增加一键上阵' into master_xma_local

ZhangBiao 2020-12-03 05:30:39 +08:00
commit c5c4efef63
11 changed files with 234 additions and 162 deletions

View File

@ -15758,6 +15758,30 @@ MonoBehaviour:
extension: .mp3
resPathIndex: 103
resAbNameIndex: 434
- resName: Audio_dhdj_skin01_attack01
extension: .mp3
resPathIndex: 103
resAbNameIndex: 434
- resName: Audio_dhdj_skin01_attack02
extension: .mp3
resPathIndex: 103
resAbNameIndex: 434
- resName: Audio_dhdj_skin01_attack03
extension: .mp3
resPathIndex: 103
resAbNameIndex: 434
- resName: Audio_dhdj_skin01_exskill01
extension: .mp3
resPathIndex: 103
resAbNameIndex: 434
- resName: Audio_dhdj_skin01_exskill02
extension: .mp3
resPathIndex: 103
resAbNameIndex: 434
- resName: Audio_dhdj_skin01_exskill03
extension: .mp3
resPathIndex: 103
resAbNameIndex: 434
- resName: Audio_Effect_c_ab_00014_t3_attack01
extension: .mp3
resPathIndex: 103
@ -16066,6 +16090,18 @@ MonoBehaviour:
extension: .mp3
resPathIndex: 103
resAbNameIndex: 494
- resName: Audio_swk_skin01_attack01
extension: .mp3
resPathIndex: 103
resAbNameIndex: 494
- resName: Audio_swk_skin01_attack02
extension: .mp3
resPathIndex: 103
resAbNameIndex: 494
- resName: Audio_swk_skin01_attack03
extension: .mp3
resPathIndex: 103
resAbNameIndex: 494
- resName: Audio_s_jieling_dlg_3010_attack_01
extension: .mp3
resPathIndex: 103
@ -30486,6 +30522,14 @@ MonoBehaviour:
extension: .png
resPathIndex: 229
resAbNameIndex: 1847
- resName: juexing
extension: .png
resPathIndex: 230
resAbNameIndex: 1848
- resName: lingshoushan
extension: .png
resPathIndex: 230
resAbNameIndex: 1848
- resName: r_guanka_sheji_bu_01
extension: .png
resPathIndex: 230
@ -54788,7 +54832,6 @@ MonoBehaviour:
- lz4/atlas/tagbuttonatlas.unity3d
- lz4/bg/battle/r_zhandou_changjing_1.unity3d
- lz4/bg/jl-jinengkuang.unity3d
- lz4/bg/r_chouka_zhubeijing.unity3d
- lz4/dynamicatlas/artfont/r_zhandou_zuijiabiaoti.unity3d
- lz4/dynamicatlas/card/t_biandui_hong.unity3d
- lz4/dynamicatlas/card/t_zhandoukuang_hong.unity3d

View File

@ -15,7 +15,12 @@ function this.GetFormationIndex()
return FormationTypeDef.FORMATION_ARENA_DEFEND
end
--- 提交按钮点击事件
function this.On_Btn1_Click()
this.root.SetOneKeyGo()
end
function this.On_Btn2_Click()
local formation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ARENA_DEFEND)
if #formation.teamHeroInfos == 0 then
PopupTipPanel.ShowTip(Language[10711])
@ -39,7 +44,9 @@ end
function this.InitView()
this.root.bg:SetActive(true)
this.root.btn_1:SetActive(true)
this.root.btn_1_lab.text = Language[10712]
this.root.btn_1_lab.text = Language[10743]
this.root.btn_2:SetActive(true)
this.root.btn_2_lab.text = Language[10712]
this.root.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Arena })

View File

@ -18,7 +18,12 @@ function this.GetFormationIndex()
return FormationTypeDef.ARENA_TOM_MATCH
end
--- 提交按钮点击事件
---
function this.On_Btn1_Click()
this.root.SetOneKeyGo()
end
function this.On_Btn2_Click()
--保存编队
if not hadClick then
hadClick = true
@ -53,7 +58,9 @@ end
function this.InitView()
this.root.bg:SetActive(true)
this.root.btn_1:SetActive(true)
this.root.btn_1_lab.text = Language[10508]
this.root.btn_1_lab.text = Language[10743]
this.root.btn_2:SetActive(true)
this.root.btn_2_lab.text = Language[10508]
hadClick = false
-- 没开启或者开启没参赛都属于未参赛
local isOpen = ArenaTopMatchManager.IsTopMatchActive()

View File

@ -15,17 +15,13 @@ this.IsNeedChangeFormation = true
--- 逻辑初始化
function this.Init(root, curMapId)
this.root = root
-- if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
this.curMapId = EndLessMapManager.openMapId
-- else
-- this.curMapId = curMapId
-- end
this.InitView()
end
--- 获取需要显示的编队id
function this.GetFormationIndex()
local index = 0
if CarbonManager.difficulty == 4 then
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
index = FormationTypeDef.FORMATION_ENDLESS_MAP
else
FormationManager.curFormationIndex = FormationTypeDef.FORMATION_NORMAL
@ -37,131 +33,131 @@ end
-- 扫荡按钮
--- btn1点击回调事件
function this.On_Btn1_Click()
if CarbonManager.difficulty == 4 and MapManager.Mapping then
if this.root.order>=1 then
this.root.SetOneKeyGo()
--以前的换成的一键上阵
-- if CarbonManager.difficulty == CARBON_TYPE.ENDLESS and MapManager.Mapping then
-- if this.root.order>=1 then
-- --保存编队
-- FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
-- FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
-- PopupTipPanel.ShowTip(Language[10713])
-- else
-- PopupTipPanel.ShowTip(Language[10714])
-- end
-- return
-- end
-- 刷新扫荡数据--应该是没了
-- this.root.ShowStartMopUpInfoData()
-- -- 显示扫荡界面
-- this.root.mopUpGo:SetActive(true)
-- PlayUIAnim( this.root.mopUpGo)
end
--- btn2点击回调事
-- local itemType = {
-- [1] = 27,
-- [3] = 28,
-- }
-- 进入地图
function this.On_Btn2_Click()
--保存编队
if this.root.order>=1 then
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
this.root:ClosePanel()
else
PopupTipPanel.ShowTip(Language[10714])
return
end
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
if MapManager.Mapping then--在地图里
if this.root.order>=1 then
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
PopupTipPanel.ShowTip(Language[10713])
else
PopupTipPanel.ShowTip(Language[10714])
end
return
end
-- 刷新扫荡数据
this.root.ShowStartMopUpInfoData()
-- 显示扫荡界面
this.root.mopUpGo:SetActive(true)
PlayUIAnim( this.root.mopUpGo)
end
--- btn2点击回调事
local itemType = {
[1] = 27,
[3] = 28,
}
-- 进入地图
function this.On_Btn2_Click()
if this.root.order>=1 then
--保存编队
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
else
PopupTipPanel.ShowTip(string.format(Language[10701], 1))
return
Log("进入的副本difficulty:"..CarbonManager.difficulty)
this.EnterMapbyType(CarbonManager.difficulty)--, itemId)
end
-- 判断当前选择的副本类型
local itemId = itemType[CarbonManager.difficulty]
end
--+=======================================
-- if this.root.order>=1 then
-- --保存编队
-- FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
-- FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
-- else
-- PopupTipPanel.ShowTip(string.format(Language[10701], 1))
-- return
-- end
-- -- 判断当前选择的副本类型
-- local itemId = itemType[CarbonManager.difficulty]
-- 无尽副本
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
if #FormationManager.GetFormationByID(401).teamHeroInfos == 0 then
PopupTipPanel.ShowTip(Language[10714])
return
end
else
if #FormationManager.formationList[FormationManager.curFormationIndex].teamHeroInfos == 0 then
Log(Language[10715])
PopupTipPanel.ShowTip(Language[10714])
return
end
end
-- if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
-- if #FormationManager.GetFormationByID(401).teamHeroInfos == 0 then
-- PopupTipPanel.ShowTip(Language[10714])
-- return
-- end
-- else
-- if #FormationManager.formationList[FormationManager.curFormationIndex].teamHeroInfos == 0 then
-- Log(Language[10715])
-- PopupTipPanel.ShowTip(Language[10714])
-- return
-- end
-- end
-- 判断挑战次数
if CarbonManager.difficulty == 1 then -- 普通副本
if BagManager.GetItemCountById(itemId) <= 0 and CarbonManager.GetNormalState(this.curMapId)then
PopupTipPanel.ShowTip(Language[10716])
return
end
elseif CarbonManager.difficulty == 3 then -- 英雄副本
if BagManager.GetItemCountById(itemId) <= 0 then
PopupTipPanel.ShowTip(Language[10717])
UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.EliteCarbonTicket })
return
end
-- elseif CarbonManager.difficulty == 2 then -- 失恋副本
-- Log("即将进入试炼副本!")
end
if CarbonManager.difficulty == 1 or CarbonManager.difficulty == 3 then
-- 战斗力判断
if this.root.formationPower <CarbonManager.recommendFightAbility[this.curMapId] then
MsgPanel.ShowTwo(Language[10718], function()
end, function()
-- 开始挑战
this.EnterMapbyType(CarbonManager.difficulty, itemId)
end, Language[10719], Language[10720]
)
else
this.EnterMapbyType(CarbonManager.difficulty, itemId)
end
else
LogGreen("进入的副本difficulty:"..CarbonManager.difficulty.." itemId: "..tostring(itemId))
MapManager.endlessEnter = true
this.EnterMapbyType(CarbonManager.difficulty, itemId)
end
-- if CarbonManager.difficulty == CARBON_TYPE.NORMAL then -- 普通副本
-- if BagManager.GetItemCountById(itemId) <= 0 and CarbonManager.GetNormalState(this.curMapId)then
-- PopupTipPanel.ShowTip(Language[10716])
-- return
-- end
-- elseif CarbonManager.difficulty == CARBON_TYPE.HERO then -- 英雄副本
-- if BagManager.GetItemCountById(itemId) <= 0 then
-- PopupTipPanel.ShowTip(Language[10717])
-- UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.EliteCarbonTicket })
-- return
-- end
-- end
-- if CarbonManager.difficulty == CARBON_TYPE.NORMAL or CarbonManager.difficulty == CARBON_TYPE.HERO then
-- -- 战斗力判断
-- if this.root.formationPower <CarbonManager.recommendFightAbility[this.curMapId] then
-- MsgPanel.ShowTwo(Language[10718], function()
-- end, function()
-- -- 开始挑战
-- this.EnterMapbyType(CarbonManager.difficulty, itemId)
-- end, Language[10719], Language[10720]
-- )
-- else
-- this.EnterMapbyType(CarbonManager.difficulty, itemId)
-- end
-- else
-- LogGreen("进入的副本difficulty:"..CarbonManager.difficulty.." itemId: "..tostring(itemId))
-- this.EnterMapbyType(CarbonManager.difficulty, itemId)
-- end
end
-- 根据不同的副本类型进入地图
function this.EnterMapbyType(type, itemId)
if type == 1 or type == 3 or type == 4 then
function this.EnterMapbyType(type)--, itemId)
if type == CARBON_TYPE.NORMAL or type == CARBON_TYPE.HERO or type == CARBON_TYPE.ENDLESS then
MapManager.curMapId = this.curMapId
-- elseif type == 2 then
-- MapManager.curMapId = trialMapData[MapTrialManager.curTowerLevel].MapId
end
local index = CarbonManager.difficulty == 4 and 401 or FormationManager.curFormationIndex
local index = CarbonManager.difficulty == CARBON_TYPE.ENDLESS and FormationTypeDef.FORMATION_ENDLESS_MAP or FormationManager.curFormationIndex
NetManager.MapInfoRequest(MapManager.curCarbonType, function()
MapManager.curAreaId = this.root.curFormationIndex
-- ======== 副本额外的设置 =================================
-- 普通副本解锁后第一次进图
if not CarbonManager.GetNormalState(MapManager.curMapId) and CarbonManager.difficulty == 1 then
-- 更新一次本地值
CarbonManager.playedMapId[MapManager.curMapId] = MapManager.curMapId
PopupTipPanel.ShowTip(Language[10721])
-- 普通、精英副本正常进图
elseif CarbonManager.difficulty == 3 or CarbonManager.difficulty == 1 then
--BagManager.UpdateItemsNum(itemId, 1)
--Log("扣除一次进入副本券, ID是 " .. itemId)
-- 试炼副本
-- elseif CarbonManager.difficulty == 2 then
-- MapTrialManager.firstEnter = true
elseif CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
-- 是否已经开放
-- if not ActTimeCtrlManager.SingleFuncState(46) then
-- PopupTipPanel.ShowTip(Language[10722])
-- return
-- end
end
-- ===========================================================
MapManager.isReloadEnter = false
SwitchPanel.OpenPanel(UIName.MapPanel)
end)
end
@ -173,52 +169,51 @@ end
-- 初始化界面显示
function this.InitView()
if CarbonManager.difficulty == 2 then
if CarbonManager.difficulty == CARBON_TYPE.TRIAL then
this.TrialCarbon()
elseif CarbonManager.difficulty == 1 or CarbonManager.difficulty == 3 then
this.NormalCarbon()
elseif CarbonManager.difficulty == 4 then
-- elseif CarbonManager.difficulty == CARBON_TYPE.NORMAL or CarbonManager.difficulty == CARBON_TYPE.HERO then
-- this.NormalCarbon()
elseif CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
this.EndLessCarbon()
end
-- 初始化编队数据
this.IniFormationSet(CarbonManager.difficulty)
this.root.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = _PanelType[CarbonManager.difficulty] })
this.root.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main})--_PanelType[CarbonManager.difficulty] })
end
--
function this.IniFormationSet(type)
this.IsNeedChangeFormation = type ~= 4
this.IsNeedChangeFormation = type ~= CARBON_TYPE.ENDLESS
end
-- 普通,精英副本设置
function this.NormalCarbon()
this.root.bg:SetActive(true)
this.root.btn_1:SetActive(true)
this.root.btn_2:SetActive(true)
this.root.btn_1_lab.text = Language[10723]
this.root.btn_2_lab.text = Language[10724]
-- 进入副本显示设置
MapManager.isCarbonEnter = true
-- function this.NormalCarbon()
-- this.root.bg:SetActive(true)
-- this.root.btn_1:SetActive(true)
-- this.root.btn_2:SetActive(true)
-- this.root.btn_1_lab.text = Language[10723]
-- this.root.btn_2_lab.text = Language[10724]
-- -- 进入副本显示设置
-- MapManager.isCarbonEnter = true
-- 设置扫荡条件
local canSweep = CarbonManager.GetMapSweepState(this.curMapId)
local rgbValue = canSweep and 1 or 0.5
Util.SetColor(this.root.btn_1, Color.New(rgbValue, rgbValue, rgbValue, 1))
this.root.btn_1:GetComponent("Button").enabled = canSweep
this.SetTipShowByType(CarbonManager.difficulty, canSweep)
end
-- -- 设置扫荡条件
-- local canSweep = CarbonManager.GetMapSweepState(this.curMapId)
-- local rgbValue = canSweep and 1 or 0.5
-- Util.SetColor(this.root.btn_1, Color.New(rgbValue, rgbValue, rgbValue, 1))
-- this.root.btn_1:GetComponent("Button").enabled = canSweep
-- this.SetTipShowByType(CarbonManager.difficulty, canSweep)
-- end
-- 设置精英副本跟普通副本的提示显示
function this.SetTipShowByType(type, canSweep)
local isEliteCarbon = type == 3
this.root.mobTip:SetActive(not canSweep and not isEliteCarbon)
this.root.eliteTip:SetActive(not canSweep and isEliteCarbon)
-- 普通-精英副本得到的地图ID this.curMapId
this.root.eliteNumNeed.text = CarbonManager.EliteSweepCondition(this.curMapId)
end
-- -- 设置精英副本跟普通副本的提示显示
-- function this.SetTipShowByType(type, canSweep)
-- local isEliteCarbon = type == 3
-- this.root.mobTip:SetActive(not canSweep and not isEliteCarbon)
-- this.root.eliteTip:SetActive(not canSweep and isEliteCarbon)
-- -- 普通-精英副本得到的地图ID this.curMapId
-- this.root.eliteNumNeed.text = CarbonManager.EliteSweepCondition(this.curMapId)
-- end
-- 试炼副本设置
function this.TrialCarbon()
@ -236,13 +231,14 @@ function this.EndLessCarbon()
if MapManager.Mapping then
this.root.bg:SetActive(true)
this.root.btn_1:SetActive(true)
this.root.btn_2:SetActive(false)
this.root.btn_1_lab.text = Language[10726]
this.root.btn_2:SetActive(true)
this.root.btn_1_lab.text = Language[10743]
this.root.btn_2_lab.text = Language[10726]
else
this.root.bg:SetActive(true)
this.root.btn_1:SetActive(false)
this.root.btn_1:SetActive(true)
this.root.btn_2:SetActive(true)
this.root.btn_1_lab.text = Language[10723]
this.root.btn_1_lab.text = Language[10743]
this.root.btn_2_lab.text = Language[10724]
-- 进入副本显示设置
MapManager.isCarbonEnter = true

View File

@ -18,7 +18,12 @@ function this.GetFormationIndex()
return FormationTypeDef.EXPEDITION
end
--- btn1点击回调事件
function this.On_Btn1_Click()
this.root.SetOneKeyGo()
end
function this.On_Btn2_Click()
if not hadClick then
hadClick = true
if this.root.order>=1 then
@ -55,7 +60,9 @@ end
-- 初始化界面显示
function this.InitView()
this.root.btn_1:SetActive(true)
this.root.btn_1_lab.text = Language[10708]
this.root.btn_2:SetActive(true)
this.root.btn_1_lab.text = Language[10743]
this.root.btn_2_lab.text = Language[10708]
MapManager.isCarbonEnter = false
this.root.formTip:SetActive(true)
this.root.formTip:GetComponent("Text").text = Language[10727] ..20 .. Language[10728]

View File

@ -14,7 +14,12 @@ function this.GetFormationIndex()
return FormationTypeDef.GUILD_CAR_DELEAY
end
--- btn1点击回调事件
function this.On_Btn1_Click()
this.root.SetOneKeyGo()
end
function this.On_Btn2_Click()
if not hadClick then
hadClick = true
if this.root.order>=1 then
@ -51,7 +56,9 @@ end
-- 初始化界面显示
function this.InitView()
this.root.btn_1:SetActive(true)
this.root.btn_1_lab.text = Language[10708]
this.root.btn_1_lab.text = Language[10743]
this.root.btn_2:SetActive(true)
this.root.btn_2_lab.text = Language[10708]
MapManager.isCarbonEnter = false
this.root.formTip:SetActive(false)
local costTip = this.root.costTip

View File

@ -26,10 +26,16 @@ end
function this.InitView()
this.root.btn_1:SetActive(true)
this.root.btn_1_lab.text = Language[10512]
this.root.btn_1_lab.text = Language[10743]
this.root.btn_2:SetActive(true)
this.root.btn_2_lab.text = Language[10512]
end
function this.On_Btn1_Click()
this.root.SetOneKeyGo()
end
function this.On_Btn2_Click()
if this.root.order>=1 then
--保存编队
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,

View File

@ -17,7 +17,12 @@ function this.GetFormationIndex()
return FormationTypeDef.GUILD_TRANSCRIPT
end
--- btn1点击回调事件
function this.On_Btn1_Click()
this.root.SetOneKeyGo()
end
function this.On_Btn2_Click()
if not hadClick then
hadClick = true
if this.root.order>=1 then
@ -35,26 +40,16 @@ function this.On_Btn1_Click()
hadClick = false
return
end
-- 战斗力判断
-- GetCurNodeInfo = ExpeditionManager.GetCurNodeInfo()
--if this.root.formationPower >= this.nodeData.bossTeaminfo.totalForce then
this.StartFight()
--else
-- MsgPanel.ShowTwo("当前队伍战力小于推荐战力,战斗可能会有失败风险。确定是否要继续战斗?", function()
-- hadClick = false
-- end, function()
-- this.StartFight()
-- end, "取消", "确定"
-- )
--end
end
end
-- 初始化界面显示
function this.InitView()
this.root.btn_1:SetActive(true)
this.root.btn_1_lab.text = Language[10708]
this.root.btn_1_lab.text = Language[10743]
this.root.btn_2:SetActive(true)
this.root.btn_2_lab.text = Language[10708]
MapManager.isCarbonEnter = false
this.root.formTip:SetActive(false)
local costTip = this.root.costTip

View File

@ -17,7 +17,7 @@ function this.GetFormationIndex()
end
--- btn1点击回调事件 -- lEFT
function this.On_Btn1_Click()
function this.On_Btn2_Click()
if this.root.order>=1 then
--保存编队
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
@ -44,16 +44,17 @@ function this.On_Btn1_Click()
this.StraightBattle()
end
--- btn2点击回调事件 --RIGHT
function this.On_Btn2_Click()
function this.On_Btn1_Click()
this.root.SetOneKeyGo()
end
function this.InitView()
this.root.bg:SetActive(true)
this.root.btn_1:SetActive(true)
this.root.btn_2:SetActive(false)
this.root.btn_2:SetActive(true)
-- this.root.failText:SetActive(true)
this.root.btn_1_lab.text = Language[10709]
this.root.btn_1_lab.text = Language[10743]
this.root.btn_2_lab.text = Language[10709]
this.root.passBattle0.gameObject:SetActive(false)
this.root.passBattle1.gameObject:SetActive(false)

View File

@ -21,8 +21,9 @@ end
-- 初始化界面显示
function this.InitView()
this.root.bg:SetActive(true)
this.root.btn_1:SetActive(false)
this.root.btn_1:SetActive(true)
this.root.btn_2:SetActive(true)
this.root.btn_1_lab.text = Language[10743]
this.root.btn_2_lab.text = Language[10709]
this.root.tip:SetActive(true)
this.root.exampleBtn:SetActive(false)
@ -36,6 +37,7 @@ end
--- btn1点击回调事件
function this.On_Btn1_Click()
this.root.SetOneKeyGo()
end
-- 进入地图

View File

@ -94,6 +94,7 @@ function this.SingleInfoDataShow(go,data)
sortNumTabs[i] = Util.GetGameObject(go, "SortNum/SortNum ("..i..")")
sortNumTabs[i]:SetActive(false)
end
LogRed("data.rank:"..data.rank)
if data.rank < 4 then
sortNumTabs[data.rank]:SetActive(true)
else