【山河社稷图】提交
parent
364ce0526b
commit
57e1e32e32
|
@ -110,6 +110,7 @@ RectTransform:
|
|||
- {fileID: 5508371999915091412}
|
||||
- {fileID: 5508371999346995973}
|
||||
- {fileID: 2461572105942810881}
|
||||
- {fileID: 5508372000661152921}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -315,80 +316,6 @@ Animator:
|
|||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorControllerStateOnDisable: 0
|
||||
--- !u!1 &4726216130476568607
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4726216130476568606}
|
||||
- component: {fileID: 4726216130476568604}
|
||||
- component: {fileID: 4726216130476568605}
|
||||
m_Layer: 5
|
||||
m_Name: bg
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4726216130476568606
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4726216130476568607}
|
||||
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: 5508372000447838862}
|
||||
m_RootOrder: 0
|
||||
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: 0, y: -67.3}
|
||||
m_SizeDelta: {x: 624, y: 624}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4726216130476568604
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4726216130476568607}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &4726216130476568605
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4726216130476568607}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: e0912e6e3470d9e4fb6a958f6ebe3a85, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &4851699411703130399
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1091,7 +1018,6 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 5508372001009023505}
|
||||
- {fileID: 5508372001069985797}
|
||||
- {fileID: 5508372000661152921}
|
||||
m_Father: {fileID: 2461825146493731649}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -1431,7 +1357,7 @@ RectTransform:
|
|||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4726216130476568606}
|
||||
- {fileID: 8820123010394209404}
|
||||
- {fileID: 5508372000555612672}
|
||||
- {fileID: 5508371999245423291}
|
||||
- {fileID: 5508371999065688677}
|
||||
|
@ -1619,12 +1545,12 @@ RectTransform:
|
|||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.99978596, y: 0.99978596, z: 0.99978596}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5508371999915091412}
|
||||
m_RootOrder: 2
|
||||
m_Father: {fileID: 2461825146493731649}
|
||||
m_RootOrder: 5
|
||||
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: -80.4, y: -200.95}
|
||||
m_AnchoredPosition: {x: 459.6, y: 759.05}
|
||||
m_SizeDelta: {x: 70.74, y: 70.74}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5508372000661152925
|
||||
|
@ -1951,3 +1877,77 @@ MonoBehaviour:
|
|||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: 300
|
||||
--- !u!1 &8820123010394209405
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8820123010394209404}
|
||||
- component: {fileID: 8820123010394209406}
|
||||
- component: {fileID: 8820123010394209407}
|
||||
m_Layer: 5
|
||||
m_Name: bg
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8820123010394209404
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8820123010394209405}
|
||||
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: 5508372000447838862}
|
||||
m_RootOrder: 0
|
||||
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: 0, y: -67.3}
|
||||
m_SizeDelta: {x: 624, y: 624}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8820123010394209406
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8820123010394209405}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &8820123010394209407
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8820123010394209405}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: e0912e6e3470d9e4fb6a958f6ebe3a85, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
|
|
|
@ -1576,6 +1576,7 @@ HELP_TYPE = {
|
|||
ArenaGuess = 84,--竞技场竞猜界面
|
||||
XiangYaoDuoBao=85,--降妖夺宝
|
||||
TaSuiLingXiao = 90,--踏碎凌霄
|
||||
FightLevel = 92,--山河社稷图
|
||||
}
|
||||
|
||||
NumToComplexFont = {
|
||||
|
|
|
@ -458,5 +458,9 @@ GameEvent = {
|
|||
GuaJi={
|
||||
getEvent = "GuaJi.getEvent",
|
||||
CloseStoryMapPanel = "GuaJi.CloseStoryMapPanel",
|
||||
},
|
||||
--山河社稷图
|
||||
FightLevel={
|
||||
MainLevelInfoRefresh = "FightLevel.MainLevelInfoRefresh",--主关卡详情界面属性
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ local npc
|
|||
function FightLevelChapterPanel:InitComponent()
|
||||
self.btnBack = Util.GetGameObject(self.gameObject, "btnBack")
|
||||
self.sortBtn = Util.GetGameObject(self.gameObject, "sortBtn")
|
||||
self.helpBtn = Util.GetGameObject(self.gameObject, "rightUp/helpBtn")
|
||||
self.helpBtn = Util.GetGameObject(self.gameObject, "helpBtn")
|
||||
self.helpPos = self.helpBtn:GetComponent("RectTransform").localPosition
|
||||
this.starNumText = Util.GetGameObject(self.gameObject, "rightUp/starNumText"):GetComponent("Text")
|
||||
|
||||
|
@ -27,7 +27,7 @@ function FightLevelChapterPanel:BindEvent()
|
|||
self:ClosePanel()
|
||||
end)
|
||||
Util.AddClick(self.helpBtn, function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.Expedition,self.helpPos.x,self.helpPos.y)
|
||||
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.FightLevel,self.helpPos.x,self.helpPos.y)
|
||||
end)
|
||||
Util.AddClick(self.sortBtn, function()
|
||||
UIManager.OpenPanel(UIName.RankingSingleListPanel,rankKingList[15],1)
|
||||
|
@ -48,7 +48,6 @@ end
|
|||
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function FightLevelChapterPanel:OnShow()
|
||||
|
||||
this.OnShowPanel()
|
||||
end
|
||||
function this.OnShowPanel()
|
||||
|
@ -69,7 +68,7 @@ function this.SingleChapterDataShow(go, data)
|
|||
local open = Util.GetGameObject(go, "open")
|
||||
local lock = Util.GetGameObject(go, "lock")
|
||||
local curIndexImage = Util.GetGameObject(go, "curIndexImage")
|
||||
Util.GetGameObject(go, "redPoint"):SetActive(FightLevelManager.GetChapterRewardBoxRedPoint(data.chapterId))
|
||||
Util.GetGameObject(go, "redPoint"):SetActive(FightLevelManager.GetSingleChapterRewardBoxRedPoint(data.chapterId))
|
||||
if curChapterId == data.chapterId then
|
||||
if npc then
|
||||
npc:OnClose()
|
||||
|
|
|
@ -40,6 +40,7 @@ function this.Initialize()
|
|||
HardStageNode.config = curChapterAllLevel[j]--表
|
||||
singleChapterData.node[HardStageNode.nodeId] = HardStageNode
|
||||
end
|
||||
LogYellow("LengthOfTable(singleChapterData.node) "..LengthOfTable(singleChapterData.node))
|
||||
singleChapterData.reward = {}
|
||||
singleChapterData.curMaxStarNum = curMaxStarNum--章节总星数
|
||||
allChapterData[config.Id] = singleChapterData
|
||||
|
@ -99,6 +100,7 @@ function this.GetCurChapterId()
|
|||
return curChapterId
|
||||
end
|
||||
function this.SetisShowChapterOpenPopup(_isShowChapterOpenPopup)
|
||||
LogYellow("山河社稷图 是否弹章节开启 "..tostring(_isShowChapterOpenPopup))
|
||||
isShowChapterOpenPopup = _isShowChapterOpenPopup
|
||||
end
|
||||
function this.GetisShowChapterOpenPopup()
|
||||
|
@ -138,14 +140,21 @@ local HardStageFightResponseMsg = {}
|
|||
local curBattlefightLevelData = {}
|
||||
function this.FightLevelFightBattle(_fightLevelData, callBack)
|
||||
LogYellow("山河社稷图请求战斗 星级 ".._fightLevelData.nodeId)
|
||||
LogYellow("UIManager.IsOpen(UIName.FightLevelSingleLevelInfoPopup) "..tostring(UIManager.IsOpen(UIName.FightLevelSingleLevelInfoPopup)))
|
||||
-- if UIManager.IsOpen(UIName.FightLevelSingleLevelInfoPopup) then
|
||||
UIManager.ClosePanel(UIName.FightLevelSingleLevelInfoPopup)
|
||||
-- end
|
||||
NetManager.HardStageFightRequest(_fightLevelData.nodeId, FormationTypeDef.FIGHT_LEVEL,function (msg)--FIGHT_LEVEL
|
||||
LogYellow("山河社稷图回复战斗 星级 "..msg.stars)
|
||||
LogYellow("山河社稷图回复战斗 drop "..#msg.drop.itemlist)
|
||||
HardStageFightResponseMsg = msg
|
||||
curBattlefightLevelData = _fightLevelData
|
||||
if _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel or _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevel then
|
||||
if _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then
|
||||
local fightData = BattleManager.GetBattleServerData(msg,0)
|
||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel and BATTLE_TYPE.FIGHTLEVEL or BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL, callBack)
|
||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.FIGHTLEVEL, callBack)
|
||||
elseif _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevel then
|
||||
local fightData = BattleManager.GetBattleServerData(msg,0)
|
||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL, callBack)
|
||||
elseif _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevelReward then
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
--刷新数据刷新界面
|
||||
|
@ -164,24 +173,28 @@ end
|
|||
--入口红点判断
|
||||
function this.GetChapterRewardBoxRedPoint()
|
||||
for i = 1, #allChapterData do
|
||||
this.GetChapterRewardBoxRedPoint(i)
|
||||
local curChapterIsShowRed = this.GetSingleChapterRewardBoxRedPoint(i)
|
||||
if curChapterIsShowRed then
|
||||
LogYellow("山河社稷图入口 redpoint true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
LogYellow("山河社稷图入口 redpoint false")
|
||||
return false
|
||||
end
|
||||
--章节入口红点判断
|
||||
function this.GetChapterRewardBoxRedPoint(chapterId)
|
||||
function this.GetSingleChapterRewardBoxRedPoint(chapterId)
|
||||
if allChapterData[chapterId] and allChapterData[chapterId].stars > 0 then
|
||||
if allChapterData[chapterId].reward and #allChapterData[chapterId].reward > 0 then
|
||||
for k = 1, #allChapterData[chapterId].reward do
|
||||
if allChapterData[chapterId].reward[k].state == 0 and allChapterData[chapterId].stars > allChapterData[chapterId].reward[k].config.Star then
|
||||
LogYellow("chapterId redpoint true "..chapterId)
|
||||
if allChapterData[chapterId].reward[k].state == 0 and allChapterData[chapterId].stars >= allChapterData[chapterId].reward[k].config.Star then
|
||||
LogYellow("chapterId true redpoint: "..chapterId)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
LogYellow("chapterId redpoint false "..chapterId)
|
||||
LogYellow("chapterId false redpoint: "..chapterId)
|
||||
return false
|
||||
end
|
||||
--编队数据判断
|
||||
|
@ -276,4 +289,16 @@ function this.GetFormationHeroMaxNum(parameter)
|
|||
end
|
||||
return ActTimeCtrlManager.MaxArmyNum()
|
||||
end
|
||||
--领取完章节宝箱数据 前端自己赋值刷新
|
||||
function this.SetChapterBoxRewardData(_chapterId,_Id,_state)
|
||||
if allChapterData[_chapterId] then
|
||||
if allChapterData[_chapterId].reward then
|
||||
for i = 1, #allChapterData[_chapterId].reward do
|
||||
if allChapterData[_chapterId].reward[i].id == _Id then
|
||||
allChapterData[_chapterId].reward[i].state = _state
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return this
|
|
@ -36,7 +36,7 @@ function this.OnShowPanel()
|
|||
local config = ConfigManager.GetConfigData(ConfigName.HardStageChapter,chapterDataId)
|
||||
this.titleImage.sprite = Util.LoadSprite("j_jsxgq_biaoti")
|
||||
this.chapterName.text = config.Name
|
||||
this.chapterImage.sprite = Util.LoadSprite(config.BigNumber)
|
||||
this.chapterImage.sprite = Util.LoadSprite(config.Map)
|
||||
end
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function FightLevelOpenChapterPopup:OnClose()
|
||||
|
|
|
@ -63,14 +63,21 @@ function this.OnShowPanel()
|
|||
this.chapterNameText.text = chapterData.config.Name
|
||||
this.chapterNameImage.sprite = Util.LoadSprite(chapterData.config.BigNumber)
|
||||
if chapterData.node and LengthOfTable(chapterData.node) > 0 then
|
||||
this.SetSingleLevel(chapterData.node)
|
||||
local curchapterData = {}
|
||||
LogYellow(" "..LengthOfTable(chapterData.node))
|
||||
for key, value in pairs(chapterData.node) do
|
||||
table.insert(curchapterData,value)
|
||||
end
|
||||
table.sort(curchapterData, function(a,b) return a.nodeId < b.nodeId end)
|
||||
LogYellow("curchapterData "..#curchapterData)
|
||||
this.SetSingleLevel(curchapterData)
|
||||
end
|
||||
if chapterData.reward and LengthOfTable(chapterData.reward) > 0 then
|
||||
this.SetlevelBox(chapterData.reward)
|
||||
end
|
||||
end
|
||||
function this.SetSingleLevel(levelDatas)
|
||||
for i = 1, math.max(#levelDatas, #levelList) do
|
||||
for i = 1, math.max(#levelDatas , #levelList) do
|
||||
local go = levelList[i]
|
||||
if not go then
|
||||
go = newObject(this.prb)
|
||||
|
@ -82,16 +89,19 @@ function this.SetSingleLevel(levelDatas)
|
|||
end
|
||||
go.gameObject:SetActive(false)
|
||||
end
|
||||
for i, v in pairs(levelDatas) do
|
||||
for i = 1, #levelDatas do
|
||||
local levelData = levelDatas[i]
|
||||
LogYellow("i "..i)
|
||||
levelList[i]:SetActive(true)
|
||||
levelList[i].transform.localPosition = Vector3.New(levelDatas[i].config.LevelPointPosition[1],levelDatas[i].config.LevelPointPosition[2],0)
|
||||
local prb1 = Util.GetGameObject(levelList[i], "prb1")
|
||||
local prb2 = Util.GetGameObject(levelList[i], "prb2")
|
||||
prb1:SetActive(false)
|
||||
prb2:SetActive(false)
|
||||
Util.SetGray(prb1, levelDatas[i].nodeId > FightLevelManager.GetCurChapterLevelId())
|
||||
Util.SetGray(prb2, levelDatas[i].nodeId > FightLevelManager.GetCurChapterLevelId())
|
||||
local isOpen = this.GetCurLevelIsOpen(levelDatas[i])-- -1 未开启 0 开启 1 需解锁上一关 2 等级不足
|
||||
LogYellow("isOpen "..isOpen.." "..tostring(not (isOpen == 0)))
|
||||
Util.SetGray(prb1, not (isOpen == 0))
|
||||
Util.SetGray(prb2, not (isOpen == 0))
|
||||
-- levelList[i]:SetActive(not (levelDatas[i].nodeId > FightLevelManager.GetCurChapterLevelId()))
|
||||
if levelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then --主关卡
|
||||
prb1:SetActive(true)
|
||||
|
@ -101,23 +111,46 @@ function this.SetSingleLevel(levelDatas)
|
|||
curIndexStarGo:SetActive(FightLevelManager.GetCurLevelStarState(levelData.state,j))
|
||||
end
|
||||
Util.AddOnceClick(levelList[i], function()
|
||||
LogYellow("关卡类型 1 主 2 副奖励 3 副战斗 "..levelData.config.StageType)
|
||||
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.MainLevel,levelData)
|
||||
if isOpen == 0 then
|
||||
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.MainLevel,levelData)
|
||||
elseif isOpen == -1 then
|
||||
PopupTipPanel.ShowTip("未开启!")
|
||||
elseif isOpen == 1 then
|
||||
PopupTipPanel.ShowTip("通关上一关后解锁!")
|
||||
elseif isOpen == 2 then
|
||||
PopupTipPanel.ShowTip(string.format("到达%s级后解锁!",levelDatas[i].config.LevelLimit))
|
||||
end
|
||||
end)
|
||||
elseif levelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevelReward then--副关卡奖励
|
||||
prb2:SetActive(true)
|
||||
Util.AddOnceClick(levelList[i], function()
|
||||
LogYellow("关卡类型 1 主 2 副奖励 3 副战斗 "..levelData.config.StageType)
|
||||
-- if
|
||||
FightLevelManager.FightLevelFightBattle(levelData, function()
|
||||
|
||||
end)
|
||||
end)
|
||||
if isOpen == 0 then
|
||||
if levelData.state == 0 then
|
||||
FightLevelManager.FightLevelFightBattle(levelData, function()
|
||||
end)
|
||||
elseif levelData.state == 1 then
|
||||
PopupTipPanel.ShowTip("奖励已领取!")
|
||||
end
|
||||
elseif isOpen == -1 then
|
||||
PopupTipPanel.ShowTip("未开启!")
|
||||
elseif isOpen == 1 then
|
||||
PopupTipPanel.ShowTip("通关上一关后解锁!")
|
||||
elseif isOpen == 2 then
|
||||
PopupTipPanel.ShowTip(string.format("到达%s级后解锁!",levelDatas[i].config.LevelLimit))
|
||||
end
|
||||
end)
|
||||
elseif levelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevel then--副关卡战斗
|
||||
prb2:SetActive(true)
|
||||
Util.AddOnceClick(levelList[i], function()
|
||||
LogYellow("关卡类型 1 主 2 副奖励 3 副战斗 "..levelData.config.StageType)
|
||||
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.AssistantLevel,levelData)
|
||||
if isOpen == 0 then
|
||||
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.AssistantLevel,levelData)
|
||||
elseif isOpen == -1 then
|
||||
PopupTipPanel.ShowTip("未开启!")
|
||||
elseif isOpen == 1 then
|
||||
PopupTipPanel.ShowTip("通关上一关后解锁!")
|
||||
elseif isOpen == 2 then
|
||||
PopupTipPanel.ShowTip(string.format("到达%s级后解锁!",levelDatas[i].config.LevelLimit))
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
@ -157,8 +190,12 @@ function this.SetlevelBox(_rewardBoxDatas)
|
|||
Util.AddOnceClick(boxList[i], function()
|
||||
NetManager.GetHardStageChapterReward(chapterData.chapterId,missionConfigData.Id,function(msg)
|
||||
--自己刷新一下宝箱数据
|
||||
FightLevelManager.SetChapterBoxRewardData(chapterData.chapterId,missionConfigData.Id,1)
|
||||
CheckRedPointStatus(RedPointType.FightLevel)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop, 1,function()--isBackBattle true时 为回放不走回调
|
||||
|
||||
if chapterData.reward and LengthOfTable(chapterData.reward) > 0 then
|
||||
this.SetlevelBox(chapterData.reward)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
@ -167,6 +204,9 @@ function this.SetlevelBox(_rewardBoxDatas)
|
|||
end
|
||||
elseif _rewardBoxDatas[i].state == 1 then
|
||||
Util.GetGameObject(boxList[i], "getFinish"):SetActive(true)
|
||||
Util.AddOnceClick(boxList[i], function()
|
||||
PopupTipPanel.ShowTip("奖励已领取!")
|
||||
end)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -182,6 +222,19 @@ function this.LeftOrRightBtnClickEvent(index)
|
|||
|
||||
end
|
||||
end
|
||||
|
||||
function this.GetCurLevelIsOpen(levelDatas)
|
||||
if levelDatas.config.LevelLimit == -1 then
|
||||
return -1
|
||||
end
|
||||
if levelDatas.nodeId > FightLevelManager.GetCurChapterLevelId() then
|
||||
return 1
|
||||
end
|
||||
if levelDatas.config.LevelLimit > PlayerManager.level then
|
||||
return 2
|
||||
end
|
||||
return 0
|
||||
end
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function FightLevelSingleChapterPanel:OnClose()
|
||||
end
|
||||
|
|
|
@ -78,7 +78,7 @@ function this:OnShow(_parent,...)
|
|||
fightLevelData = args[1]
|
||||
this.titleText.text="关卡情报"
|
||||
this.tip.text="特殊规则"
|
||||
this.conditionInfoText:GetComponent("Text").text = HardStageBuff[fightLevelData.config.HardStageBuff].Describe
|
||||
this.conditionInfoText:GetComponent("Text").text = HardStageBuff[fightLevelData.config.HardStageBuff] and HardStageBuff[fightLevelData.config.HardStageBuff].Describe or ""
|
||||
this.sureBtnText.text=Language[10287]
|
||||
this.power.text = fightLevelData.config.RecommendFightAbility
|
||||
curShowIndex = true
|
||||
|
|
|
@ -54,9 +54,11 @@ function this:BindEvent()
|
|||
end
|
||||
|
||||
function this:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.FightLevel.MainLevelInfoRefresh, this.MainLevelInfoRefresh)
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.FightLevel.MainLevelInfoRefresh, this.MainLevelInfoRefresh)
|
||||
end
|
||||
function this:OnShow(_parent,...)
|
||||
parent=_parent
|
||||
|
@ -71,6 +73,21 @@ function this:OnShow(_parent,...)
|
|||
this:FormationAdapter()
|
||||
this:ShoeCondition()
|
||||
end
|
||||
function this.MainLevelInfoRefresh()
|
||||
if fightLevelData then
|
||||
local curChapterData = FightLevelManager.GetChapterData(fightLevelData.config.Chapter)
|
||||
if curChapterData then
|
||||
fightLevelData = curChapterData.node[fightLevelData.config.Id]
|
||||
--条件组数据
|
||||
condition = fightLevelData.config.ConditionValue
|
||||
|
||||
this:FormationAdapter()
|
||||
this:ShoeCondition()
|
||||
end
|
||||
else
|
||||
parent:ClosePanel()
|
||||
end
|
||||
end
|
||||
function this:ShoeCondition()
|
||||
for i = 1, math.max(#condition, #conditionGo) do
|
||||
local go = conditionGo[i]
|
||||
|
|
|
@ -902,6 +902,6 @@ function this.HardStageResponse(buffer)
|
|||
local msg = PlayerInfoProto_pb.HardStageResponse()
|
||||
msg:ParseFromString(data)
|
||||
LogError("后端 山河社稷图 推送")
|
||||
FightLevelManager.UpdataChapterData(msg.info)
|
||||
FightLevelManager.UpdataChapterData(msg.info,true)
|
||||
end
|
||||
return this
|
|
@ -44,7 +44,7 @@ function BattleWinPopup:NextStep()
|
|||
self:ClosePanel()
|
||||
return
|
||||
end
|
||||
|
||||
LogYellow("m_fightType "..m_fightType)
|
||||
if m_fightType == BATTLE_TYPE.MAP_FIGHT then --副本战斗结算
|
||||
|
||||
-- local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
||||
|
@ -275,7 +275,15 @@ function this.ShowBattleResultByFightLevelType(drop)
|
|||
end
|
||||
this:ClosePanel()
|
||||
if FightLevelManager.GetisShowChapterOpenPopup() then
|
||||
UIManager.OpenPanel(UIName.FightLevelOpenChapterPopup,FightLevelManager.GetCurChapterId())
|
||||
UIManager.OpenPanel(UIName.FightLevelOpenChapterPopup,FightLevelManager.GetCurChapterId(),function()
|
||||
-- Timer.New(function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
||||
-- end, 1):Start()
|
||||
end)
|
||||
else
|
||||
-- Timer.New(function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
||||
-- end, 1):Start()
|
||||
end
|
||||
end
|
||||
end, 8,true,true)
|
||||
|
@ -292,6 +300,7 @@ function this.ShowBattleResultByFightLevelAssistantType(drop)
|
|||
local HardStageFightResponseMsg = FightLevelManager.GetHardStageFightResponseMsg()
|
||||
LogYellow("山河社稷图战斗获得星级 "..HardStageFightResponseMsg.stars)
|
||||
local curBattlefightLevelData = FightLevelManager.GetcurBattlefightLevelData()
|
||||
LogYellow("curBattlefightLevelData.state "..curBattlefightLevelData.state)
|
||||
if curBattlefightLevelData.state == 0 then--副关卡未通过 第一次通关 展示奖励
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,HardStageFightResponseMsg.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
||||
if not isBackBattle then
|
||||
|
@ -302,11 +311,11 @@ function this.ShowBattleResultByFightLevelAssistantType(drop)
|
|||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
this:ClosePanel()
|
||||
if FightLevelManager.GetisShowChapterOpenPopup() then
|
||||
UIManager.OpenPanel(UIName.FightLevelOpenChapterPopup,FightLevelManager.GetCurChapterId())
|
||||
end
|
||||
Timer.New(function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
||||
end, 1):Start()
|
||||
end
|
||||
end, 1,true,true)
|
||||
end)
|
||||
elseif curBattlefightLevelData.state == 1 then
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,HardStageFightResponseMsg.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
||||
if not isBackBattle then
|
||||
|
@ -317,9 +326,9 @@ function this.ShowBattleResultByFightLevelAssistantType(drop)
|
|||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
this:ClosePanel()
|
||||
if FightLevelManager.GetisShowChapterOpenPopup() then
|
||||
UIManager.OpenPanel(UIName.FightLevelOpenChapterPopup,FightLevelManager.GetCurChapterId())
|
||||
end
|
||||
Timer.New(function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
||||
end, 1):Start()
|
||||
end
|
||||
end, 9,true,true)
|
||||
end
|
||||
|
|
|
@ -74,7 +74,7 @@ function RewardItemPopup:InitComponent()
|
|||
this.FightLevel2=Util.GetGameObject(self.gameObject,"ScrollView/Content/Show/FightLevel")
|
||||
this.FightLevelStarGos = {}
|
||||
for i = 1, 3 do
|
||||
this.FightLevelStarGos[i] = Util.GetGameObject(this.FightLevel,"star ( "..i..")")
|
||||
this.FightLevelStarGos[i] = Util.GetGameObject(this.FightLevel,"star ("..i..")")
|
||||
end
|
||||
--山河社稷图副关卡
|
||||
this.FightLevelAssistant=Util.GetGameObject(self.gameObject,"ScrollView/Content/Show/FightLevelAssistant")
|
||||
|
@ -145,8 +145,9 @@ function RewardItemPopup:OnOpen(...)
|
|||
this.guildCarDelay:SetActive(compShowType == 3)
|
||||
this.tasuilingxiao:SetActive(compShowType == 7)--踏碎凌霄
|
||||
this.FightLevel:SetActive(compShowType == 8)--山河社稷图
|
||||
this.GXHD:SetActive(not compShowType == 8)
|
||||
this.FightLevel2:SetActive(compShowType == 8 and (not drop or (drop and #drop <= 0)))
|
||||
this.GXHD:SetActive(not (compShowType == 8))
|
||||
LogYellow("compShowType "..compShowType)
|
||||
this.FightLevel2:SetActive(compShowType == 8 and (not drop or (#drop.itemlist < 1 and #drop.equipId < 1 and #drop.Hero < 1 and #drop.soulEquip < 1 and #drop.pokemon < 1)))
|
||||
this.FightLevelAssistant:SetActive(compShowType == 9)
|
||||
this.dropGrid:SetActive(false)
|
||||
this.dropGridArena:SetActive(false)
|
||||
|
@ -298,8 +299,8 @@ function this.FightLevelShow()
|
|||
for i = 1, #this.FightLevelStarGos do
|
||||
local noStarImage = Util.GetGameObject(this.FightLevelStarGos[i], "noStarImage")
|
||||
local getStarImage = Util.GetGameObject(this.FightLevelStarGos[i], "getStarImage")
|
||||
noStarImage:SetActive(not FightLevelManager.GetCurLevelStarState(GetHardStageFightResponseMsg.state,i))
|
||||
getStarImage:SetActive(FightLevelManager.GetCurLevelStarState(GetHardStageFightResponseMsg.state,i))
|
||||
noStarImage:SetActive(not FightLevelManager.GetCurLevelStarState(GetHardStageFightResponseMsg.stars,i))
|
||||
getStarImage:SetActive(FightLevelManager.GetCurLevelStarState(GetHardStageFightResponseMsg.stars,i))
|
||||
Util.GetGameObject(this.FightLevelStarGos[i], "Text"):GetComponent("Text").text = i
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue