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