挑战副本脚本修改提交
parent
77ac1e27cf
commit
b4a626d9e2
|
|
@ -283,7 +283,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1421105423562867200
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -705,6 +705,86 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &1871303096356098061
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4876175093250278864}
|
||||
- component: {fileID: 6901831702187834385}
|
||||
- component: {fileID: 207464763164205395}
|
||||
m_Layer: 5
|
||||
m_Name: TitleText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4876175093250278864
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1871303096356098061}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2239549473092137549}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -323.0005, y: 0}
|
||||
m_SizeDelta: {x: 165, y: 165}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6901831702187834385
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1871303096356098061}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &207464763164205395
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1871303096356098061}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ebfe0e44da74fbd44b1b744995de2324, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 80
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 100
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: 11
|
||||
LanguageIndex: 0
|
||||
--- !u!1 &1977277405961338348
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -799,7 +879,7 @@ GameObject:
|
|||
- component: {fileID: 3289200219704205822}
|
||||
- component: {fileID: 352167118}
|
||||
m_Layer: 5
|
||||
m_Name: DailyCarbonPanel
|
||||
m_Name: ChallengeCopyPanel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
|
@ -1265,7 +1345,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2239549473092137549}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
|
@ -1486,7 +1566,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2239549473092137549}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
|
@ -1565,6 +1645,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 8420361761945447324}
|
||||
- {fileID: 1421105423562867200}
|
||||
- {fileID: 4876175093250278864}
|
||||
- {fileID: 6403195048930280866}
|
||||
- {fileID: 6530197106428225390}
|
||||
- {fileID: 1221379356726746056}
|
||||
|
|
@ -1608,7 +1689,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 2800389897786691465}
|
||||
m_Father: {fileID: 2239549473092137549}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
|
|
@ -1686,7 +1767,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0.00000023464423, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 100}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!114 &4153919401695343612
|
||||
|
|
@ -1964,7 +2045,7 @@ RectTransform:
|
|||
- {fileID: 8797316285502679983}
|
||||
- {fileID: 3345945376859019430}
|
||||
m_Father: {fileID: 2239549473092137549}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
|
|
|
|||
|
|
@ -1334,6 +1334,8 @@ FORMATION_TYPE = {
|
|||
QIJIESHILIAN=26,--七界试炼编队
|
||||
LINGMAIMIJING=27,--灵脉秘境编队
|
||||
ExploreFunc = 28,
|
||||
ChallengeCopy_1 = 29,
|
||||
ChallengeCopy_2 = 30,
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -2045,6 +2047,9 @@ FormationTypeDef = {
|
|||
Explore3 = 3103,
|
||||
Explore4 = 3104,
|
||||
Explore5 = 3105,
|
||||
|
||||
ChallengeCopy_1=3201, --挑战副本 无尽副本
|
||||
ChallengeCopy_2=3202, --挑战副本 金币副本
|
||||
|
||||
FORMATION_TEMPORARY = 10000, --临时编队, 编队用
|
||||
FORMATION_TEMPORARY_PROP = 10001, -- 临时编队, 属性计算用
|
||||
|
|
@ -2783,6 +2788,8 @@ BATTLE_TYPE = {
|
|||
LINGMAIMIJING = 25, -- 灵脉秘境
|
||||
XUAN_YUAN_MIRROR = 26, -- 轩辕宝镜
|
||||
TRIAL_FIGHT = 27, -- 森罗幻境
|
||||
CHALLENG_COPY_1=28, --挑战副本 无尽
|
||||
CHALLENG_COPY_2=29, --挑战副本 金币
|
||||
|
||||
}
|
||||
--isRankingMainPanelShow:_1 本服 _2 跨服 3_跨服不显示在排行主界面 4 用于十绝阵特殊判断 --0非跨服界面内排行榜(达人)
|
||||
|
|
|
|||
|
|
@ -492,6 +492,7 @@ CHALLENGEREQUEST_ID_FIELD = protobuf.FieldDescriptor();
|
|||
CHALLENGERESPONSE = protobuf.Descriptor();
|
||||
CHALLENGERESPONSE_DROP_FIELD = protobuf.FieldDescriptor();
|
||||
CHALLENGERESPONSE_FIGHTDATA_FIELD = protobuf.FieldDescriptor();
|
||||
CHALLENGERESPONSE_RESULT_FIELD = protobuf.FieldDescriptor();
|
||||
GETSOMEACTIVITYINFOREQUEST = protobuf.Descriptor();
|
||||
GETSOMEACTIVITYINFOREQUEST_ID_FIELD = protobuf.FieldDescriptor();
|
||||
GETSOMEACTITITYINFORESPONE = protobuf.Descriptor();
|
||||
|
|
@ -5224,11 +5225,21 @@ CHALLENGERESPONSE_FIGHTDATA_FIELD.message_type = CommonProto_pb.FIGHTDATA
|
|||
CHALLENGERESPONSE_FIGHTDATA_FIELD.type = 11
|
||||
CHALLENGERESPONSE_FIGHTDATA_FIELD.cpp_type = 10
|
||||
|
||||
CHALLENGERESPONSE_RESULT_FIELD.name = "result"
|
||||
CHALLENGERESPONSE_RESULT_FIELD.full_name = ".rpc.protocols.ChallengeResponse.result"
|
||||
CHALLENGERESPONSE_RESULT_FIELD.number = 3
|
||||
CHALLENGERESPONSE_RESULT_FIELD.index = 2
|
||||
CHALLENGERESPONSE_RESULT_FIELD.label = 1
|
||||
CHALLENGERESPONSE_RESULT_FIELD.has_default_value = false
|
||||
CHALLENGERESPONSE_RESULT_FIELD.default_value = 0
|
||||
CHALLENGERESPONSE_RESULT_FIELD.type = 5
|
||||
CHALLENGERESPONSE_RESULT_FIELD.cpp_type = 1
|
||||
|
||||
CHALLENGERESPONSE.name = "ChallengeResponse"
|
||||
CHALLENGERESPONSE.full_name = ".rpc.protocols.ChallengeResponse"
|
||||
CHALLENGERESPONSE.nested_types = {}
|
||||
CHALLENGERESPONSE.enum_types = {}
|
||||
CHALLENGERESPONSE.fields = {CHALLENGERESPONSE_DROP_FIELD, CHALLENGERESPONSE_FIGHTDATA_FIELD}
|
||||
CHALLENGERESPONSE.fields = {CHALLENGERESPONSE_DROP_FIELD, CHALLENGERESPONSE_FIGHTDATA_FIELD, CHALLENGERESPONSE_RESULT_FIELD}
|
||||
CHALLENGERESPONSE.is_extendable = false
|
||||
CHALLENGERESPONSE.extensions = {}
|
||||
GETSOMEACTIVITYINFOREQUEST_ID_FIELD.name = "id"
|
||||
|
|
|
|||
|
|
@ -1092,5 +1092,9 @@ end
|
|||
function this.UpdateChallengeCopyFloor(_type)
|
||||
this.challengeCopyDataTable[_type].currentFloor=this.challengeCopyDataTable[_type].currentFloor+1
|
||||
end
|
||||
--检测副本是否开启
|
||||
function this.CheckCopyOpenState(copyId)
|
||||
return this.challengeCopyDataTable[copyId].overTime==1
|
||||
end
|
||||
|
||||
return this
|
||||
|
|
@ -10,14 +10,14 @@ local curData={}
|
|||
|
||||
local orginLayer=0
|
||||
|
||||
local carbonIndex=0--副本索引
|
||||
local carbonIndex=0-- 1 无尽副本 2 金币副本 副本索引id
|
||||
local maxForce = 0
|
||||
--顶部背景图
|
||||
local titleBg={
|
||||
--金币
|
||||
[1]={bg="r_richang_banner_5_zh", titleImg = "r_richang_banner_5_zi_zh", titleTip = GetLanguageStrById(specialConfig[41].Value),pos = Vector3.New(257.08,658.37,0)},
|
||||
--经验
|
||||
[2]={bg="r_richang_banner_4_zh", titleImg = "r_richang_banner_4_zi_zh", titleTip = GetLanguageStrById(specialConfig[42].Value),pos = Vector3.New(257.08,651.24,0)},
|
||||
--回合
|
||||
[1]={bg="r_richang_banner_5_zh", titleImg = "r_richang_banner_huihe_zh", titleTip = GetLanguageStrById(specialConfig[150].Value),pos = Vector3.New(257.08,658.37,0)},
|
||||
--伤害
|
||||
[2]={bg="r_richang_banner_4_zh", titleImg = "r_richang_banner_shanghai_zh", titleTip = GetLanguageStrById(specialConfig[151].Value),pos = Vector3.New(257.08,651.24,0)},
|
||||
}
|
||||
--难度图片
|
||||
local qualityBg={
|
||||
|
|
@ -40,8 +40,8 @@ local freeTime=0--剩余免费次数
|
|||
|
||||
--Tab
|
||||
local TabBox = require("Modules/Common/TabBox")
|
||||
local _TabData={ [1] = { default = "r_richang_anniu_jinbi_01_zh", select = "r_richang_anniu_jinbi_zh",lock = "r_richang_anniu_jinbi_zh", name = Language[10282],type=FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN },
|
||||
[2] = { default = "r_richang_anniu_jingyan_01_zh", select = "r_richang_anniu_jingyan_zh",lock = "r_richang_anniu_jingyan_zh", name = Language[10283],type=FUNCTION_OPEN_TYPE.DAILYCHALLENGE_EXP },
|
||||
local _TabData={ [1] = { default = "r_richang_anniu_huihe_01_zh", select = "r_richang_anniu_huihe_zh",lock = "r_richang_anniu_huihe_zh", name = Language[10282],type=FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN },
|
||||
[2] = { default = "r_richang_anniu_shanghai_01_zh", select = "r_richang_anniu_shanghai_zh",lock = "r_richang_anniu_shanghai_zh", name = Language[10283],type=FUNCTION_OPEN_TYPE.DAILYCHALLENGE_EXP },
|
||||
}
|
||||
|
||||
function ChallengeCopyPanel:InitComponent()
|
||||
|
|
@ -77,7 +77,7 @@ function ChallengeCopyPanel:BindEvent()
|
|||
end)
|
||||
--帮助按钮
|
||||
Util.AddClick(this.helpBtn, function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.DailyCarbon,this.helpPosition.x,this.helpPosition.y)
|
||||
UIManager.OpenPanel(UIName.HelpPopup,128,this.helpPosition.x,this.helpPosition.y)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ function ChallengeCopyPanel:RemoveListener()
|
|||
end
|
||||
|
||||
function ChallengeCopyPanel:OnOpen(_carbonIndex)
|
||||
carbonIndex = _carbonIndex and _carbonIndex or 1
|
||||
carbonIndex = CarbonManager.CheckCopyOpenState(1) and 1 or 2
|
||||
this.upView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
|
||||
end
|
||||
|
||||
|
|
@ -110,8 +110,6 @@ function ChallengeCopyPanel:OnShow()
|
|||
PlayerManager.maxForce = curFormationForce
|
||||
end
|
||||
maxForce = PlayerManager.maxForce
|
||||
|
||||
if carbonIndex==0 then carbonIndex=1 end
|
||||
this.TabCtrl:SetTabAdapter(this.TabAdapter)
|
||||
this.TabCtrl:SetTabIsLockCheck(this.TabIsLockCheck)
|
||||
this.TabCtrl:SetChangeTabCallBack(function(index)
|
||||
|
|
@ -149,16 +147,15 @@ end
|
|||
--刷新面板
|
||||
function this.RefreshShow(i,isTop,isAni)
|
||||
carbonIndex = i
|
||||
LogBlue("~~~-------~carbonIndex:"..carbonIndex)
|
||||
curData={}
|
||||
curData=ConfigManager.GetAllConfigsDataByKey(ConfigName.ChallengeStage,"Chapter",i)
|
||||
|
||||
this.titleBg.sprite=this.spLoader:LoadSprite(titleBg[i].bg)
|
||||
this.titleImg.sprite=this.spLoader:LoadSprite(titleBg[i].titleImg)
|
||||
this.titleTip.text=titleBg[i].titleTip
|
||||
-- this.titleTip.gameObject:GetComponent("RectTransform").localPosition = titleBg[i].pos
|
||||
this.SetTimeTip()
|
||||
this.SetScroll(i,isTop,isAni)
|
||||
ChallengeCopyPanel:RefreshRedPotShow()
|
||||
end
|
||||
|
||||
|
||||
|
|
@ -180,11 +177,12 @@ function this.SetScroll(i,isTop,isAni)
|
|||
this.scrollView:SetIndex(curMaxOpenId - 2 < 1 and 1 or (curMaxOpenId - 2))
|
||||
end
|
||||
|
||||
--设置滚动条数据 root根节点 data本地表数据 ldata 上一条数据
|
||||
function this.SetData(root, data, ldata)
|
||||
--设置滚动条数据 root根节点 data本地表数据
|
||||
function this.SetData(root, data)
|
||||
local type=0 --0为未开启 1为挑战 2为扫荡
|
||||
local bgQuality=Util.GetGameObject(root,"Bg"):GetComponent("Image")
|
||||
local title=Util.GetGameObject(root,"Title"):GetComponent("Image")
|
||||
local titleText=Util.GetGameObject(root,"TitleText"):GetComponent("Text")
|
||||
local reward=Util.GetGameObject(root,"Reward")
|
||||
local tip=Util.GetGameObject(root,"Tip"):GetComponent("Text")
|
||||
local power=Util.GetGameObject(root,"powerBtn/value"):GetComponent("Text")
|
||||
|
|
@ -199,6 +197,7 @@ function this.SetData(root, data, ldata)
|
|||
local storeData=ConfigManager.GetConfigDataByDoubleKey(ConfigName.StoreConfig,"StoreId",7,"Limit",data.PivilegeID[1])--商店表数据
|
||||
title.sprite=this.spLoader:LoadSprite(qualityBg[1].s)
|
||||
title:SetNativeSize()
|
||||
titleText.text=data.Section
|
||||
bgQuality.sprite=this.spLoader:LoadSprite(qualityBg[1].b)
|
||||
type=CarbonManager.CheckChallengeCopyId(data.Chapter,data.NextLevel)
|
||||
local showReward={}
|
||||
|
|
@ -297,27 +296,41 @@ function this.SetData(root, data, ldata)
|
|||
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeData.Id,1,function() end)
|
||||
end
|
||||
|
||||
|
||||
-- TODO: 没有战斗结果校验
|
||||
NetManager.ChallengeCopyRequest(data.Chapter,type,data.Id,function(msg)
|
||||
local fightData = BattleManager.GetBattleServerData(msg)
|
||||
if type==1 then --挑战
|
||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.DAILY_CHALLENGE , function(result)
|
||||
if result.result ==0 then
|
||||
elseif result.result==1 then
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
CarbonManager.UpdateChallengeCopyFloor(data.Chapter)
|
||||
this.RefreshShow(carbonIndex,false,false)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
elseif type==2 then --扫荡
|
||||
if type==1 then --挑战
|
||||
if data.Chapter==1 then
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.ChallengeCopy_1,data)
|
||||
else
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.ChallengeCopy_2,data)
|
||||
end
|
||||
elseif type==2 then --扫荡
|
||||
NetManager.ChallengeCopyRequest(data.Chapter,2,data.Id,function(msg)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.PivilegeID[2],1)
|
||||
this.RefreshShow(carbonIndex,false,false)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
-- TODO: 没有战斗结果校验
|
||||
-- NetManager.ChallengeCopyRequest(data.Chapter,type,data.Id,function(msg)
|
||||
-- local fightData = BattleManager.GetBattleServerData(msg)
|
||||
-- if type==1 then --挑战
|
||||
-- UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.CHALLENG_COPY , function(result)
|
||||
-- if result.result ==0 then
|
||||
-- elseif result.result==1 then
|
||||
-- UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
-- CarbonManager.UpdateChallengeCopyFloor(data.Chapter)
|
||||
-- this.RefreshShow(carbonIndex,false,false)
|
||||
-- end)
|
||||
-- end
|
||||
-- end)
|
||||
-- elseif type==2 then --扫荡
|
||||
-- UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
-- PrivilegeManager.RefreshPrivilegeUsedTimes(data.PivilegeID[2],1)
|
||||
-- this.RefreshShow(carbonIndex,false,false)
|
||||
-- end)
|
||||
-- end
|
||||
-- end)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
@ -351,7 +364,7 @@ end
|
|||
---检测tab是否锁定
|
||||
function this.TabIsLockCheck(index)
|
||||
if CarbonManager.challengeCopyDataTable[index].openState==0 then
|
||||
return true
|
||||
return true,"副本未开启"
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ this.PanelOptionView = {
|
|||
[FORMATION_TYPE.QIJIESHILIAN]="Modules/Formation/View/QiJieFormation",
|
||||
[FORMATION_TYPE.LINGMAIMIJING]="Modules/Formation/View/LingMaiFormation",
|
||||
[FORMATION_TYPE.ExploreFunc]="Modules/Formation/View/ExploreFormation",
|
||||
[FORMATION_TYPE.ChallengeCopy_1]="Modules/Formation/View/ChallengeCopyFormation",
|
||||
[FORMATION_TYPE.ChallengeCopy_2]="Modules/Formation/View/ChallengeCopyFormation",
|
||||
}
|
||||
function this:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
|
|
@ -242,7 +244,7 @@ function this:OnSortingOrderChange()
|
|||
end
|
||||
|
||||
function this:OnOpen(_panelType,...)
|
||||
-- Log("panelType:".._panelType)
|
||||
Log("panelType:".._panelType)
|
||||
panelType = _panelType
|
||||
if panelType == FORMATION_TYPE.EXPEDITION or panelType == FORMATION_TYPE.CARBON then
|
||||
for k,v in pairs(bgListGo) do
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
----- --挑战副本 -----
|
||||
local ChallengeCopyFormation = {}
|
||||
local this = ChallengeCopyFormation
|
||||
|
||||
--- 是否需要切换编队的功能
|
||||
this.IsNeedChangeFormation = false
|
||||
|
||||
--- 逻辑初始化
|
||||
function this.Init(root, data)
|
||||
this.root = root
|
||||
this.data = data
|
||||
this.InitView()
|
||||
end
|
||||
--- 获取需要显示的编队id
|
||||
function this.GetFormationIndex()
|
||||
if this.data.Chapter==1 then
|
||||
return FormationTypeDef.ChallengeCopy_1
|
||||
else
|
||||
return FormationTypeDef.ChallengeCopy_2
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- btn1点击回调事件 -- lEFT
|
||||
function this.On_Btn2_Click()
|
||||
if #this.root.choosedList>=1 then
|
||||
--保存编队
|
||||
FormationManager.SaveFormation(this.root.curFormationIndex, this.root.choosedList,
|
||||
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
|
||||
else
|
||||
PopupTipPanel.ShowTip(string.format(Language[10699], 1))
|
||||
return
|
||||
end
|
||||
|
||||
-- 判断编队
|
||||
if #FormationManager.formationList[this.GetFormationIndex()].teamHeroInfos == 0 then
|
||||
PopupTipPanel.ShowTip(Language[10700])
|
||||
return
|
||||
end
|
||||
LogGreen("挑战副本:")
|
||||
this.StartFight()
|
||||
end
|
||||
--- btn2点击回调事件 --RIGHT
|
||||
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(true)
|
||||
this.root.btn_1_lab.text = Language[10710]
|
||||
this.root.btn_2_lab.text = Language[10707]
|
||||
this.root.passBattle0.gameObject:SetActive(false)
|
||||
this.root.passBattle1.gameObject:SetActive(false)
|
||||
this.root.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.MonsterCamp })
|
||||
end
|
||||
|
||||
function this.StartFight()
|
||||
NetManager.ChallengeCopyRequest(this.data.Chapter,1,this.data .Id,function(msg)
|
||||
LogGreen("挑战副本战斗返回:")
|
||||
local fightData = BattleManager.GetBattleServerData(msg)
|
||||
local battleType
|
||||
if this.data.Chapter==1 then
|
||||
battleType=BATTLE_TYPE.CHALLENG_COPY_1
|
||||
else
|
||||
battleType=BATTLE_TYPE.CHALLENG_COPY_2
|
||||
end
|
||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, battleType , function()
|
||||
LogGreen("222222战斗结果:"..msg.result)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
if msg.result==1 then
|
||||
CarbonManager.UpdateChallengeCopyFloor(this.data.Chapter)
|
||||
end
|
||||
-- this.RefreshShow(carbonIndex,false,false)
|
||||
end)
|
||||
end)
|
||||
this.root:ClosePanel()
|
||||
end)
|
||||
end
|
||||
|
||||
return this
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2303bafff57aac4469c5af2202d96e60
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Reference in New Issue