【山河社稷图】提交
parent
32d592b7bc
commit
1ed38be14a
|
@ -2088,8 +2088,8 @@ MonoBehaviour:
|
||||||
m_Alignment: 3
|
m_Alignment: 3
|
||||||
m_AlignByGeometry: 0
|
m_AlignByGeometry: 0
|
||||||
m_RichText: 1
|
m_RichText: 1
|
||||||
m_HorizontalOverflow: 1
|
m_HorizontalOverflow: 0
|
||||||
m_VerticalOverflow: 1
|
m_VerticalOverflow: 0
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: "\u554A\u5B9E\u6253\u5B9E\u7684"
|
m_Text: "\u554A\u5B9E\u6253\u5B9E\u7684"
|
||||||
--- !u!1 &5075872451606573120
|
--- !u!1 &5075872451606573120
|
||||||
|
|
|
@ -3344,9 +3344,9 @@ RectTransform:
|
||||||
m_Father: {fileID: 7310179388651908018}
|
m_Father: {fileID: 7310179388651908018}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 433.5, y: -323.575}
|
||||||
m_SizeDelta: {x: 867, y: 207.85}
|
m_SizeDelta: {x: 867, y: 207.85}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &5255812259235183218
|
--- !u!1 &5255812259235183218
|
||||||
|
@ -3385,9 +3385,9 @@ RectTransform:
|
||||||
m_Father: {fileID: 7310179388651908018}
|
m_Father: {fileID: 7310179388651908018}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 433.5, y: -127.925}
|
||||||
m_SizeDelta: {x: 867, y: 207.85}
|
m_SizeDelta: {x: 867, y: 207.85}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &5255812259255272684
|
--- !u!1 &5255812259255272684
|
||||||
|
|
|
@ -138,7 +138,7 @@ function this.InitActivityServerData(msg, isUpdate)
|
||||||
|
|
||||||
this.CheckMoneyProgress(v)
|
this.CheckMoneyProgress(v)
|
||||||
this.mission[v.activityId] = v
|
this.mission[v.activityId] = v
|
||||||
LogYellow("刷新活动数据activityId:" .. v.activityId .. " value:" .. v.value)
|
-- LogYellow("刷新活动数据activityId:" .. v.activityId .. " value:" .. v.value)
|
||||||
for n, m in ipairs(v.mission) do
|
for n, m in ipairs(v.mission) do
|
||||||
--LogGreen(" 刷新活动数据missionId:" .. m.missionId .. " state:" .. m.state .. " progress:" .. m.progress)
|
--LogGreen(" 刷新活动数据missionId:" .. m.missionId .. " state:" .. m.state .. " progress:" .. m.progress)
|
||||||
if (v.activityId == ActivityTypeDef.OnlineGift) then
|
if (v.activityId == ActivityTypeDef.OnlineGift) then
|
||||||
|
|
|
@ -31,13 +31,12 @@ function this.Initialize()
|
||||||
local curChapterAllLevel = ConfigManager.GetAllConfigsDataByKey(ConfigName.HardStage,"Chapter", config.Id)
|
local curChapterAllLevel = ConfigManager.GetAllConfigsDataByKey(ConfigName.HardStage,"Chapter", config.Id)
|
||||||
for j = 1, #curChapterAllLevel do
|
for j = 1, #curChapterAllLevel do
|
||||||
curMaxStarNum = curMaxStarNum + curChapterAllLevel[j].HighestStar
|
curMaxStarNum = curMaxStarNum + curChapterAllLevel[j].HighestStar
|
||||||
|
|
||||||
local HardStageNode = {}
|
local HardStageNode = {}
|
||||||
HardStageNode.nodeId = curChapterAllLevel[j].Id
|
HardStageNode.nodeId = curChapterAllLevel[j].Id
|
||||||
HardStageNode.type = curChapterAllLevel[j].StageType--类型:0.大节点1.小节点
|
HardStageNode.type = curChapterAllLevel[j].StageType--类型:0.大节点1.小节点
|
||||||
HardStageNode.state = 0--状态:0-7星级状态,8为荣耀三星,0为小节点未通过1为小节点通过
|
HardStageNode.state = 0--状态:0-7星级状态,8为荣耀三星,0为小节点未通过1为小节点通过
|
||||||
HardStageNode.config = curChapterAllLevel[j]--表
|
HardStageNode.config = curChapterAllLevel[j]--表
|
||||||
table.insert(singleChapterData.node,HardStageNode)
|
singleChapterData.node[HardStageNode.nodeId] = HardStageNode
|
||||||
end
|
end
|
||||||
singleChapterData.curMaxStarNum = curMaxStarNum--章节总星数
|
singleChapterData.curMaxStarNum = curMaxStarNum--章节总星数
|
||||||
allChapterData[config.Id] = singleChapterData
|
allChapterData[config.Id] = singleChapterData
|
||||||
|
@ -50,11 +49,11 @@ function this.UpdataChapterData(msg)
|
||||||
if msg then
|
if msg then
|
||||||
for i = 1, #msg.chapter do
|
for i = 1, #msg.chapter do
|
||||||
local singleHardStageChapter = allChapterData[msg.chapter[i].chapterId]
|
local singleHardStageChapter = allChapterData[msg.chapter[i].chapterId]
|
||||||
LogYellow("msg.chapter[i].chapterId "..msg.chapter[i].chapterId.." "..msg.chapter[i].stars)
|
LogYellow("msg.chapter[i].chapterId "..msg.chapter[i].chapterId.." "..msg.chapter[i].stars.." node num "..#msg.chapter[i].node.." reward num "..#msg.chapter[i].reward)
|
||||||
singleHardStageChapter.chapterId = msg.chapter[i].chapterId
|
singleHardStageChapter.chapterId = msg.chapter[i].chapterId
|
||||||
this.SetCurChapterId(singleHardStageChapter.chapterId)
|
this.SetCurChapterId(singleHardStageChapter.chapterId)
|
||||||
singleHardStageChapter.stars = msg.chapter[i].stars--章节获得总星数
|
singleHardStageChapter.stars = msg.chapter[i].stars--章节获得总星数
|
||||||
singleHardStageChapter.node = {}
|
-- singleHardStageChapter.node = {}
|
||||||
for j = 1, #msg.chapter[i].node do
|
for j = 1, #msg.chapter[i].node do
|
||||||
local HardStageNode = {}
|
local HardStageNode = {}
|
||||||
HardStageNode.nodeId = msg.chapter[i].node[j].nodeId
|
HardStageNode.nodeId = msg.chapter[i].node[j].nodeId
|
||||||
|
@ -62,9 +61,9 @@ function this.UpdataChapterData(msg)
|
||||||
HardStageNode.state = msg.chapter[i].node[j].state--状态:0-7星级状态,8为荣耀三星,0为小节点未通过1为小节点通过
|
HardStageNode.state = msg.chapter[i].node[j].state--状态:0-7星级状态,8为荣耀三星,0为小节点未通过1为小节点通过
|
||||||
HardStageNode.config = HardStage[msg.chapter[i].node[j].nodeId]--表
|
HardStageNode.config = HardStage[msg.chapter[i].node[j].nodeId]--表
|
||||||
this.SetCurChapterLevelId(HardStageNode.nodeId)
|
this.SetCurChapterLevelId(HardStageNode.nodeId)
|
||||||
table.insert(singleHardStageChapter.node,HardStageNode)
|
singleHardStageChapter.node[HardStageNode.nodeId] = HardStageNode
|
||||||
end
|
end
|
||||||
singleHardStageChapter.reward = {}--每章宝箱奖励
|
-- singleHardStageChapter.reward = {}--每章宝箱奖励
|
||||||
for k = 1, #msg.chapter[i].reward do
|
for k = 1, #msg.chapter[i].reward do
|
||||||
local HardStageChapterReward = {}
|
local HardStageChapterReward = {}
|
||||||
HardStageChapterReward.id = msg.chapter[i].reward[k].id
|
HardStageChapterReward.id = msg.chapter[i].reward[k].id
|
||||||
|
@ -106,6 +105,16 @@ end
|
||||||
function this.GetCurLevelStarState(starNum,index)
|
function this.GetCurLevelStarState(starNum,index)
|
||||||
return stateList[starNum][index] == 1
|
return stateList[starNum][index] == 1
|
||||||
end
|
end
|
||||||
|
--请求回放
|
||||||
|
function this.HardStageReportRequset(_fightLevelData, callBack)
|
||||||
|
NetManager.HardStageReportRequset(_fightLevelData.config.Chapter, _fightLevelData.nodeId,function (msg)--FIGHT_LEVEL
|
||||||
|
if msg.player and #msg.player > 0 then
|
||||||
|
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.BackBattle,msg.player)
|
||||||
|
else
|
||||||
|
PopupTipPanel.ShowTip("尚无符合条件的回放!")
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
--开始战斗
|
--开始战斗
|
||||||
local HardStageFightResponseMsg = {}
|
local HardStageFightResponseMsg = {}
|
||||||
function this.FightLevelFightBattle(_fightLevelData, callBack)
|
function this.FightLevelFightBattle(_fightLevelData, callBack)
|
||||||
|
|
|
@ -23,6 +23,8 @@ function FightLevelSingleChapterPanel:InitComponent()
|
||||||
end
|
end
|
||||||
this.leftBtn=Util.GetGameObject(self.gameObject,"middle/leftBtn")
|
this.leftBtn=Util.GetGameObject(self.gameObject,"middle/leftBtn")
|
||||||
this.rightBtn=Util.GetGameObject(self.gameObject,"middle/rightBtn")
|
this.rightBtn=Util.GetGameObject(self.gameObject,"middle/rightBtn")
|
||||||
|
this.leftBtnClick=Util.GetGameObject(self.gameObject,"middle/leftBtn/GameObject")
|
||||||
|
this.rightBtnClick=Util.GetGameObject(self.gameObject,"middle/rightBtn/GameObject")
|
||||||
end
|
end
|
||||||
|
|
||||||
--绑定事件(用于子类重写)
|
--绑定事件(用于子类重写)
|
||||||
|
@ -31,18 +33,18 @@ function FightLevelSingleChapterPanel:BindEvent()
|
||||||
Util.AddClick(self.btnBack, function()
|
Util.AddClick(self.btnBack, function()
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.leftBtn, function()
|
Util.AddClick(this.leftBtnClick, function()
|
||||||
this.LeftOrRightBtnClickEvent(1)
|
this.LeftOrRightBtnClickEvent(1)
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.rightBtn, function()
|
Util.AddClick(this.rightBtnClick, function()
|
||||||
this:LeftOrRightBtnClickEvent(2)
|
this.LeftOrRightBtnClickEvent(2)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
function FightLevelSingleChapterPanel:OnSortingOrderChange()
|
function FightLevelSingleChapterPanel:OnSortingOrderChange()
|
||||||
--特效层级重设
|
--特效层级重设
|
||||||
for i=1,#boxList do
|
-- for i=1,#boxList do
|
||||||
Util.AddParticleSortLayer(boxList[i], sortingOrder)
|
-- Util.AddParticleSortLayer(boxList[i], sortingOrder)
|
||||||
end
|
-- end
|
||||||
sortingOrder = self.sortingOrder
|
sortingOrder = self.sortingOrder
|
||||||
end
|
end
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
|
@ -84,10 +86,9 @@ function this.SetSingleLevel(levelDatas)
|
||||||
local prb2 = Util.GetGameObject(levelList[i], "prb2")
|
local prb2 = Util.GetGameObject(levelList[i], "prb2")
|
||||||
prb1:SetActive(false)
|
prb1:SetActive(false)
|
||||||
prb2:SetActive(false)
|
prb2:SetActive(false)
|
||||||
LogYellow("levelDatas[i].nodeId < FightLevelManager.GetCurChapterLevelId() "..levelDatas[i].nodeId .." ".. FightLevelManager.GetCurChapterLevelId())
|
|
||||||
Util.SetGray(prb1, levelDatas[i].nodeId > FightLevelManager.GetCurChapterLevelId())
|
Util.SetGray(prb1, levelDatas[i].nodeId > FightLevelManager.GetCurChapterLevelId())
|
||||||
Util.SetGray(prb2, levelDatas[i].nodeId > FightLevelManager.GetCurChapterLevelId())
|
Util.SetGray(prb2, levelDatas[i].nodeId > FightLevelManager.GetCurChapterLevelId())
|
||||||
levelList[i]:SetActive(not (levelDatas[i].nodeId > FightLevelManager.GetCurChapterLevelId()))
|
-- levelList[i]:SetActive(not (levelDatas[i].nodeId > FightLevelManager.GetCurChapterLevelId()))
|
||||||
if levelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then --主关卡
|
if levelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then --主关卡
|
||||||
prb1:SetActive(true)
|
prb1:SetActive(true)
|
||||||
Util.GetGameObject(prb1, "nameBg/levelName"):GetComponent("Text").text = levelData.config.Name
|
Util.GetGameObject(prb1, "nameBg/levelName"):GetComponent("Text").text = levelData.config.Name
|
||||||
|
@ -95,17 +96,20 @@ function this.SetSingleLevel(levelDatas)
|
||||||
local curIndexStarGo = Util.GetGameObject(levelList[i], "prb1/star/star (" ..j.. ")")
|
local curIndexStarGo = Util.GetGameObject(levelList[i], "prb1/star/star (" ..j.. ")")
|
||||||
curIndexStarGo:SetActive(FightLevelManager.GetCurLevelStarState(levelData.state,j))
|
curIndexStarGo:SetActive(FightLevelManager.GetCurLevelStarState(levelData.state,j))
|
||||||
end
|
end
|
||||||
|
|
||||||
Util.AddOnceClick(levelList[i], function()
|
Util.AddOnceClick(levelList[i], function()
|
||||||
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.MainLevel,levelData)
|
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.MainLevel,levelData)
|
||||||
end)
|
end)
|
||||||
elseif levelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevelReward then--副关卡奖励
|
elseif levelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevelReward then--副关卡奖励
|
||||||
prb2:SetActive(true)
|
prb2:SetActive(true)
|
||||||
Util.AddOnceClick(levelList[i], function()
|
Util.AddOnceClick(levelList[i], function()
|
||||||
|
FightLevelManager.FightLevelFightBattle(levelData, function()
|
||||||
|
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
elseif levelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevel then--副关卡战斗
|
elseif levelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevel then--副关卡战斗
|
||||||
prb2:SetActive(true)
|
prb2:SetActive(true)
|
||||||
Util.AddOnceClick(levelList[i], function()
|
Util.AddOnceClick(levelList[i], function()
|
||||||
|
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.AssistantLevel,levelData)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,35 +6,40 @@ local parent
|
||||||
local sortingOrder=0
|
local sortingOrder=0
|
||||||
local fun
|
local fun
|
||||||
local heroListGo = {}
|
local heroListGo = {}
|
||||||
local fightLevelId = 0
|
local fightLevelData = {}
|
||||||
local liveNodes = {}
|
local liveNodes = {}
|
||||||
local liveNames = {}
|
local liveNames = {}
|
||||||
local rewardGoList = {}
|
local rewardGoList = {}
|
||||||
local rewardItemViewGoList = {}
|
local rewardItemViewGoList = {}
|
||||||
local curShowIndex = true
|
local curShowIndex = true
|
||||||
|
local HardStageBuff = ConfigManager.GetConfig(ConfigName.HardStageBuff)
|
||||||
|
local RewardGroup = ConfigManager.GetConfig(ConfigName.RewardGroup)
|
||||||
|
local MonsterConfig = ConfigManager.GetConfig(ConfigName.MonsterConfig)
|
||||||
function this:InitComponent(gameObject)
|
function this:InitComponent(gameObject)
|
||||||
-- this.titleText=Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text")
|
this.titleText=Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text")
|
||||||
-- this.tip=Util.GetGameObject(gameObject,"tip"):GetComponent("Text")
|
this.tip=Util.GetGameObject(gameObject,"tip"):GetComponent("Text")
|
||||||
-- this.conditionInfoText=Util.GetGameObject(gameObject,"conditionInfoText")
|
this.conditionInfoText=Util.GetGameObject(gameObject,"conditionInfoText")
|
||||||
-- this.power = Util.GetGameObject(gameObject, "Power/Value"):GetComponent("Text")
|
this.power = Util.GetGameObject(gameObject, "Power/Value"):GetComponent("Text")
|
||||||
-- this.sureBtn=Util.GetGameObject(gameObject,"sureBtn")
|
this.sureBtn=Util.GetGameObject(gameObject,"sureBtn")
|
||||||
-- this.sureBtnText=Util.GetGameObject(gameObject,"sureBtn/Text"):GetComponent("Text")
|
this.sureBtnText=Util.GetGameObject(gameObject,"sureBtn/Text"):GetComponent("Text")
|
||||||
-- --滚动条根节点
|
--滚动条根节点
|
||||||
-- rewardGoList = {}
|
rewardGoList = {}
|
||||||
-- rewardItemViewGoList = {}
|
rewardItemViewGoList = {}
|
||||||
-- this.itemPre = Util.GetGameObject(gameObject, "itemPre")
|
this.itemPre = Util.GetGameObject(gameObject, "itemPre")
|
||||||
-- this.rewardRoot = Util.GetGameObject(gameObject, "rewardRoot")
|
this.rewardRoot = Util.GetGameObject(gameObject, "rewardRoot")
|
||||||
-- this.NoviceItemList={}--存储itemview 重复利用
|
this.NoviceItemList={}--存储itemview 重复利用
|
||||||
|
|
||||||
-- heroListGo = {}
|
heroListGo = {}
|
||||||
-- for i = 1, 6 do
|
for i = 1, 6 do
|
||||||
-- heroListGo[i] = Util.GetGameObject(gameObject, "RoleGrid/Bg"..i.."/Hero"..i)
|
heroListGo[i] = Util.GetGameObject(gameObject, "RoleGrid/Bg"..i.."/Hero"..i)
|
||||||
-- end
|
end
|
||||||
-- this.backBtn=Util.GetGameObject(gameObject,"BackBtn")
|
this.backBtn=Util.GetGameObject(gameObject,"BackBtn")
|
||||||
-- this.BackBattleBtn=Util.GetGameObject(gameObject,"BackBattleBtn")
|
this.BackBattleBtn=Util.GetGameObject(gameObject,"BackBattleBtn")
|
||||||
-- this.rewardBtn=Util.GetGameObject(gameObject,"rewardBtn")
|
-- this.rewardBtn=Util.GetGameObject(gameObject,"rewardBtn")
|
||||||
-- this.leftBtn=Util.GetGameObject(gameObject,"leftBtn")
|
this.leftBtn=Util.GetGameObject(gameObject,"leftBtn")
|
||||||
-- this.rightBtn=Util.GetGameObject(gameObject,"rightBtn")
|
this.rightBtn=Util.GetGameObject(gameObject,"rightBtn")
|
||||||
|
this.leftBtnClick=Util.GetGameObject(gameObject,"leftBtn/GameObject")
|
||||||
|
this.rightBtnClick=Util.GetGameObject(gameObject,"rightBtn/GameObject")
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:BindEvent()
|
function this:BindEvent()
|
||||||
|
@ -45,16 +50,18 @@ function this:BindEvent()
|
||||||
parent:ClosePanel()
|
parent:ClosePanel()
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.BackBattleBtn, function()
|
Util.AddClick(this.BackBattleBtn, function()
|
||||||
parent:ClosePanel()
|
FightLevelManager.HardStageReportRequset(fightLevelData, function()
|
||||||
|
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.AssistantLevel,fightLevelData)
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.rewardBtn, function()
|
|
||||||
parent:ClosePanel()
|
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.leftBtn, function()
|
-- Util.AddClick(this.rewardBtn, function()
|
||||||
this:LeftOrRightBtnClickEvent()
|
-- parent:ClosePanel()
|
||||||
|
-- end)
|
||||||
|
Util.AddClick(this.leftBtnClick, function()
|
||||||
|
this.LeftOrRightBtnClickEvent()
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.rightBtn, function()
|
Util.AddClick(this.rightBtnClick, function()
|
||||||
this:LeftOrRightBtnClickEvent()
|
this.LeftOrRightBtnClickEvent()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -64,29 +71,36 @@ end
|
||||||
function this:RemoveListener()
|
function this:RemoveListener()
|
||||||
end
|
end
|
||||||
function this:OnShow(_parent,...)
|
function this:OnShow(_parent,...)
|
||||||
-- parent=_parent
|
parent=_parent
|
||||||
-- sortingOrder = _parent.sortingOrder
|
sortingOrder = _parent.sortingOrder
|
||||||
-- --不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参
|
--不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参
|
||||||
-- local args = {...}
|
local args = {...}
|
||||||
-- fightLevelId = args[1]
|
fightLevelData = args[1]
|
||||||
-- this.titleText.text="关卡情报"
|
this.titleText.text="关卡情报"
|
||||||
|
this.tip.text="特殊规则"
|
||||||
-- this.tip.text="特殊规则"
|
this.conditionInfoText:GetComponent("Text").text = HardStageBuff[fightLevelData.config.HardStageBuff].Describe
|
||||||
-- this.conditionInfoText:GetComponent("Text").text="特殊规则"
|
this.sureBtnText.text=Language[10287]
|
||||||
-- this.sureBtnText.text=Language[10287]
|
this.power.text = fightLevelData.config.RecommendFightAbility
|
||||||
-- this.power.text = monsterData.bossTeaminfo.totalForce
|
curShowIndex = false
|
||||||
-- curShowIndex = true
|
this.LeftOrRightBtnClickEvent()
|
||||||
-- this:ShoeReward()
|
this:ShoeReward()
|
||||||
-- this:FormationAdapter()
|
this:FormationAdapter()
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:ShoeReward()
|
function this:ShoeReward()
|
||||||
local rewardDataList = {}
|
local rewardDataList = {}
|
||||||
|
for i = 1, #fightLevelData.config.PassReward do
|
||||||
|
if RewardGroup[fightLevelData.config.PassReward[i]] and RewardGroup[fightLevelData.config.PassReward[i]].ShowItem then
|
||||||
|
for j = 1, #RewardGroup[fightLevelData.config.PassReward[i]].ShowItem do
|
||||||
|
table.insert(rewardDataList,RewardGroup[fightLevelData.config.PassReward[i]].ShowItem[j])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
for i = 1, math.max(#rewardDataList, #rewardGoList) do
|
for i = 1, math.max(#rewardDataList, #rewardGoList) do
|
||||||
local go = rewardGoList[i]
|
local go = rewardGoList[i]
|
||||||
if not go then
|
if not go then
|
||||||
go = newObject(this.itemPre)
|
go = newObject(this.itemPre)
|
||||||
go.transform:SetParent(this.Root.transform)
|
go.transform:SetParent(this.rewardRoot.transform)
|
||||||
go.transform.localScale = Vector3.one
|
go.transform.localScale = Vector3.one
|
||||||
go.transform.localPosition = Vector3.zero
|
go.transform.localPosition = Vector3.zero
|
||||||
rewardGoList[i] = go
|
rewardGoList[i] = go
|
||||||
|
@ -109,13 +123,17 @@ function this:FormationAdapter()
|
||||||
for i = 1, #heroListGo do
|
for i = 1, #heroListGo do
|
||||||
heroListGo[i]:SetActive(false)
|
heroListGo[i]:SetActive(false)
|
||||||
end
|
end
|
||||||
|
local MonsterGroup = ConfigManager.GetConfigData(ConfigName.MonsterGroup,fightLevelData.config.MonsterGroup)
|
||||||
|
if MonsterGroup and MonsterGroup.Contents and MonsterGroup.Contents[1] and #MonsterGroup.Contents[1] > 0 then
|
||||||
for i = 1, #heroListGo do
|
for i = 1, #heroListGo do
|
||||||
if(monsterData.bossTeaminfo.hero[i]) then
|
if MonsterGroup.Contents[1][i] and MonsterGroup.Contents[1][i] > 0 then
|
||||||
local pos = monsterData.bossTeaminfo.hero[i].position
|
local pos = i
|
||||||
this.SetCardSingleData(heroListGo[pos],monsterData.bossTeaminfo.hero[i],pos)
|
-- LogYellow("MonsterGroup.Contents[1][i] "..MonsterGroup.Contents[1][i])
|
||||||
|
this.SetCardSingleData(heroListGo[pos],MonsterGroup.Contents[1][i],pos)
|
||||||
heroListGo[pos]:SetActive(true)
|
heroListGo[pos]:SetActive(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.OnSortingOrderChange()
|
function this.OnSortingOrderChange()
|
||||||
|
@ -132,8 +150,9 @@ end
|
||||||
|
|
||||||
--设置单个上阵英雄信息
|
--设置单个上阵英雄信息
|
||||||
function this.SetCardSingleData(o,monsterId, _pos)
|
function this.SetCardSingleData(o,monsterId, _pos)
|
||||||
|
local curMonsterConfig = MonsterConfig[monsterId]
|
||||||
o.transform.parent:GetComponent("Image").sprite=Util.LoadSprite("bd_xinkapaifan")
|
o.transform.parent:GetComponent("Image").sprite=Util.LoadSprite("bd_xinkapaifan")
|
||||||
local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, monsterId.heroTid)
|
local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, curMonsterConfig.MonsterId)
|
||||||
local bg=Util.GetGameObject(o,"Bg1"):GetComponent("Image")
|
local bg=Util.GetGameObject(o,"Bg1"):GetComponent("Image")
|
||||||
local fg=Util.GetGameObject(o,"Bg2"):GetComponent("Image")
|
local fg=Util.GetGameObject(o,"Bg2"):GetComponent("Image")
|
||||||
-- local live=Util.GetGameObject(o,"Mask/Live")
|
-- local live=Util.GetGameObject(o,"Mask/Live")
|
||||||
|
@ -158,7 +177,7 @@ function this.SetCardSingleData(o,monsterId, _pos)
|
||||||
live.transform.localPosition = Vector3.zero
|
live.transform.localPosition = Vector3.zero
|
||||||
|
|
||||||
local zs = Util.GetGameObject(o, "zs")
|
local zs = Util.GetGameObject(o, "zs")
|
||||||
local zsName = GetHeroCardStarZs[monsterId.star]
|
local zsName = GetHeroCardStarZs[curMonsterConfig.Star]
|
||||||
if zsName == "" then
|
if zsName == "" then
|
||||||
zs:SetActive(false)
|
zs:SetActive(false)
|
||||||
else
|
else
|
||||||
|
@ -167,14 +186,14 @@ function this.SetCardSingleData(o,monsterId, _pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
yuanImage:SetActive(false)
|
yuanImage:SetActive(false)
|
||||||
lv.text=monsterId.level
|
lv.text=curMonsterConfig.level
|
||||||
|
|
||||||
bg.sprite = Util.LoadSprite(GetFormationHeroCardStarBg[monsterId.star])
|
bg.sprite = Util.LoadSprite(GetFormationHeroCardStarBg[curMonsterConfig.Star])
|
||||||
fg.sprite = Util.LoadSprite(GetHeroCardStarFg[monsterId.star])
|
fg.sprite = Util.LoadSprite(GetHeroCardStarFg[curMonsterConfig.Star])
|
||||||
|
|
||||||
pro.sprite=Util.LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
|
pro.sprite=Util.LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
|
||||||
SetCardStars(starGrid,monsterId.star)
|
SetCardStars(starGrid,curMonsterConfig.Star)
|
||||||
if monsterId.star > 9 then
|
if curMonsterConfig.Star > 9 then
|
||||||
Util.GetGameObject(o,"UI_Effect_jinkuang_KaPai").gameObject:SetActive(true)
|
Util.GetGameObject(o,"UI_Effect_jinkuang_KaPai").gameObject:SetActive(true)
|
||||||
else
|
else
|
||||||
Util.GetGameObject(o,"UI_Effect_jinkuang_KaPai").gameObject:SetActive(false)
|
Util.GetGameObject(o,"UI_Effect_jinkuang_KaPai").gameObject:SetActive(false)
|
||||||
|
@ -183,12 +202,12 @@ function this.SetCardSingleData(o,monsterId, _pos)
|
||||||
SetTextVerTial(name.gameObject,Vector3.New(35,-7.45,0),nil,nil,8)
|
SetTextVerTial(name.gameObject,Vector3.New(35,-7.45,0),nil,nil,8)
|
||||||
|
|
||||||
|
|
||||||
local curHeroHpVal = monsterId.remainHp
|
local curHeroHpVal = 1
|
||||||
hp.fillAmount = curHeroHpVal
|
hp.fillAmount = curHeroHpVal
|
||||||
hpPass.fillAmount = curHeroHpVal
|
hpPass.fillAmount = curHeroHpVal
|
||||||
rage.fillAmount = 0.5
|
rage.fillAmount = 0.5
|
||||||
end
|
end
|
||||||
function this:LeftOrRightBtnClickEvent()
|
function this.LeftOrRightBtnClickEvent()
|
||||||
curShowIndex = not curShowIndex
|
curShowIndex = not curShowIndex
|
||||||
if curShowIndex then
|
if curShowIndex then
|
||||||
this.conditionInfoText:SetActive(false)
|
this.conditionInfoText:SetActive(false)
|
||||||
|
|
|
@ -42,7 +42,9 @@ function this:BindEvent()
|
||||||
parent:ClosePanel()
|
parent:ClosePanel()
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.BackBattleBtn, function()
|
Util.AddClick(this.BackBattleBtn, function()
|
||||||
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.MainLevelReward,fightLevelData)
|
FightLevelManager.HardStageReportRequset(fightLevelData, function()
|
||||||
|
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.MainLevel,fightLevelData)
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.rewardBtn, function()
|
Util.AddClick(this.rewardBtn, function()
|
||||||
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.MainLevelReward,fightLevelData)
|
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.MainLevelReward,fightLevelData)
|
||||||
|
|
|
@ -5,20 +5,25 @@ local parent
|
||||||
--传入特效层级
|
--传入特效层级
|
||||||
local sortingOrder=0
|
local sortingOrder=0
|
||||||
local fun
|
local fun
|
||||||
local fightLevelId = 0
|
local data = {}
|
||||||
local prbGoGrid = {}
|
local prbGoGrid = {}
|
||||||
|
local backFun
|
||||||
function this:InitComponent(gameObject)
|
function this:InitComponent(gameObject)
|
||||||
-- this.titleText=Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text")
|
this.titleText=Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text")
|
||||||
-- this.backBtn=Util.GetGameObject(gameObject,"BackBtn")
|
this.backBtn=Util.GetGameObject(gameObject,"BackBtn")
|
||||||
-- prbGoGrid = {}
|
prbGoGrid = {}
|
||||||
-- for i = 1, 2 do
|
for i = 1, 2 do
|
||||||
-- prbGoGrid[i] = Util.GetGameObject(gameObject,"rect/ItemPre (" .. i .. ")")
|
prbGoGrid[i] = Util.GetGameObject(gameObject,"rect/ItemPre (" .. i .. ")")
|
||||||
-- end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:BindEvent()
|
function this:BindEvent()
|
||||||
Util.AddClick(this.backBtn, function()
|
Util.AddClick(this.backBtn, function()
|
||||||
parent:ClosePanel()
|
parent:ClosePanel()
|
||||||
|
if backFun then
|
||||||
|
backFun()
|
||||||
|
backFun = nil
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
function this:AddListener()
|
function this:AddListener()
|
||||||
|
@ -28,22 +33,21 @@ function this:RemoveListener()
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:OnShow(_parent,...)
|
function this:OnShow(_parent,...)
|
||||||
-- parent=_parent
|
parent=_parent
|
||||||
-- sortingOrder = _parent.sortingOrder
|
sortingOrder = _parent.sortingOrder
|
||||||
-- --不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参
|
--不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参
|
||||||
-- local args = {...}
|
local args = {...}
|
||||||
-- fightLevelId = args[1]
|
data = args[1]
|
||||||
-- this.titleText.text="战斗回放"
|
backFun = args[2]
|
||||||
-- for i = 1, 2 do
|
this.titleText.text="战斗回放"
|
||||||
-- prbGoGrid[i]:SetActive(false)
|
for i = 1, 2 do
|
||||||
-- end
|
prbGoGrid[i]:SetActive(false)
|
||||||
-- NetManager.HeroNodeGetInfoRequest(monsterData.sortId,function (msg)
|
end
|
||||||
-- for i = 1, 2 do
|
for i = 1, #data do
|
||||||
-- local data = {}
|
local data = {}
|
||||||
-- local root = prbGoGrid[i]
|
local root = prbGoGrid[i]
|
||||||
-- this.SetInfo(root,data)
|
this.SetInfo(root,data)
|
||||||
-- end
|
end
|
||||||
-- end)
|
|
||||||
end
|
end
|
||||||
--设置头像
|
--设置头像
|
||||||
function this.SetInfo(root,data,index)
|
function this.SetInfo(root,data,index)
|
||||||
|
@ -55,21 +59,21 @@ function this.SetInfo(root,data,index)
|
||||||
end
|
end
|
||||||
this.playerScrollHead[root]:Reset()
|
this.playerScrollHead[root]:Reset()
|
||||||
this.playerScrollHead[root]:SetHead(data.head)
|
this.playerScrollHead[root]:SetHead(data.head)
|
||||||
this.playerScrollHead[root]:SetFrame(data.frame)
|
this.playerScrollHead[root]:SetFrame(data.headFrame)
|
||||||
this.playerScrollHead[root]:SetLevel(data.level)
|
this.playerScrollHead[root]:SetLevel(data.level)
|
||||||
this.playerScrollHead[root]:SetScale(Vector3.one*0.7)
|
this.playerScrollHead[root]:SetScale(Vector3.one*0.7)
|
||||||
this.playerScrollHead[root]:SetLayer(this.sortingOrder)
|
this.playerScrollHead[root]:SetLayer(this.sortingOrder)
|
||||||
this.playerScrollHead[root]:SetEffectScale(0.75)
|
this.playerScrollHead[root]:SetEffectScale(0.75)
|
||||||
|
|
||||||
Util.GetGameObject(root,"name"):GetComponent("Text").text = data.name
|
Util.GetGameObject(root,"name"):GetComponent("Text").text = data.userName
|
||||||
Util.GetGameObject(root,"warPower/Text"):GetComponent("Text").text = data.warPower
|
-- Util.GetGameObject(root,"warPower/Text"):GetComponent("Text").text = data.warPower
|
||||||
if index == 1 then
|
if index == 1 then
|
||||||
Util.GetGameObject(root,"ClickBtn/tip"):GetComponent("Text").text = "首次三星通关"
|
Util.GetGameObject(root,"ClickBtn/tip"):GetComponent("Text").text = "首次三星通关"
|
||||||
else
|
else
|
||||||
Util.GetGameObject(root,"ClickBtn/tip"):GetComponent("Text").text = "最低战力三星通关"
|
Util.GetGameObject(root,"ClickBtn/tip"):GetComponent("Text").text = "最低战力三星通关"
|
||||||
end
|
end
|
||||||
Util.AddOnceClick(Util.GetGameObject(root,"ClickBtn"), function()
|
Util.AddOnceClick(Util.GetGameObject(root,"ClickBtn"), function()
|
||||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.BACK, function()
|
UIManager.OpenPanel(UIName.BattlePanel, data.fightData, BATTLE_TYPE.BACK, function()
|
||||||
|
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -43,13 +43,18 @@ function this:OnShow(_parent,...)
|
||||||
this.titleText.text = "关卡奖励"
|
this.titleText.text = "关卡奖励"
|
||||||
this.tipText.text = "达成目标后自动发放奖励"
|
this.tipText.text = "达成目标后自动发放奖励"
|
||||||
--组数据
|
--组数据
|
||||||
rewardData = fightLevelData.config.Reward1
|
rewardData = fightLevelData.config.PassReward
|
||||||
|
for i = 1, #fightLevelData.config.Reward1 do
|
||||||
|
table.insert(rewardData,fightLevelData.config.Reward1[i])
|
||||||
|
end
|
||||||
|
|
||||||
this.ScrollView:SetData(rewardData, function (index, go)
|
this.ScrollView:SetData(rewardData, function (index, go)
|
||||||
this.SingleDataShow(go,rewardData[index],index)
|
this.SingleDataShow(go,rewardData[index],index)
|
||||||
end, true,true)
|
end, true,true)
|
||||||
end
|
end
|
||||||
function this.SingleDataShow(_go,_rewardData,index)
|
function this.SingleDataShow(_go,_rewardData,_index)
|
||||||
LogYellow("_rewardData ".._rewardData)
|
LogYellow("_rewardData ".._rewardData)
|
||||||
|
local index = _index - 1
|
||||||
local reward = RewardGroup[_rewardData].ShowItem
|
local reward = RewardGroup[_rewardData].ShowItem
|
||||||
Util.GetGameObject(_go, "titleImage/titleText"):GetComponent("Text").text = "不知道读哪"
|
Util.GetGameObject(_go, "titleImage/titleText"):GetComponent("Text").text = "不知道读哪"
|
||||||
Util.GetGameObject(_go, "titleImage/Text"):GetComponent("Text").text = index
|
Util.GetGameObject(_go, "titleImage/Text"):GetComponent("Text").text = index
|
||||||
|
|
|
@ -5037,7 +5037,7 @@ function NetManager.HardStageReportRequset(_chapterId,_nodeId,func)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
--山河社稷图开始节点战斗操作
|
--山河社稷图开始节点战斗操作
|
||||||
function NetManager.HardStageFightRequest(_nodeId,_teamId,_expInfo,func)
|
function NetManager.HardStageFightRequest(_nodeId,_teamId,func)
|
||||||
local data = PlayerInfoProto_pb.HardStageFightRequest()
|
local data = PlayerInfoProto_pb.HardStageFightRequest()
|
||||||
Log("_nodeId ".._nodeId)
|
Log("_nodeId ".._nodeId)
|
||||||
data.nodeId = _nodeId
|
data.nodeId = _nodeId
|
||||||
|
|
Loading…
Reference in New Issue