挑战副本修改

yuanshuai 2022-11-14 11:19:18 +08:00
parent 186b9c16db
commit 5fc4f301c4
3 changed files with 1430 additions and 7 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1116,11 +1116,17 @@ end
function this.GetBattleResult()
local data = {}
if this.battleResult.type==1 then
data[1] = "<color=#F9E7D3>奖励加成:</color> <color=#3DE181>"..(this.battleResult.percentReward/100).."%</color>\n<color=#AE7B20>("..this.battleResult.lossBloodOrTimes.."回合)</color>"
local reward1= ConfigManager.GetConfigData(ConfigName.ChallengeStage,1).Reward1
data[1] = "<color=#F9E7D3>回合数:</color> "..this.battleResult.lossBloodOrTimes
data[2]=this.battleResult.lossBloodOrTimes/20
data[3] = reward1
else
data[1] = "<color=#F9E7D3>奖励加成:</color> <color=#3DE181>"..(this.battleResult.percentReward/100).."%</color>\n<color=#AE7B20>(总伤害:"..this.battleResult.lossBloodOrTimes..")</color>"
local reward1= ConfigManager.GetConfigData(ConfigName.ChallengeStage,1001).Reward1
data[1] = "<color=#F9E7D3>回合数:</color> "..this.battleResult.lossBloodOrTimes
data[2]=(20-this.battleResult.lossBloodOrTimes)/20
data[3] = reward1
end
data[4] = this.battleResult.type
return data
end

View File

@ -87,6 +87,8 @@ function RewardItemPopup:InitComponent()
this.isFirstEffect = Util.GetGameObject(this.FightLevel3,"isFirst")
--七界试炼挑战条件信息
this.qiJieCondition = Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/grid/qiJieInfo")
--挑战副本结算评分信息
this.challengeInfo = Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/grid/challengeInfo")
end
--绑定事件(用于子类重写)
@ -161,7 +163,8 @@ function RewardItemPopup:OnOpen(...)
this.FightLevel3:SetActive(compShowType == 8)--山河社稷图
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.qiJieCondition:SetActive(compShowType == 10 or compShowType == 12)--七界试炼
this.qiJieCondition:SetActive(compShowType == 10)--七界试炼
this.challengeInfo:SetActive(compShowType == 12)--挑战副本
this.dropGrid:SetActive(false)
this.dropGridArena:SetActive(false)
this.lvAndExpGo:SetActive(compShowType == 1)
@ -373,9 +376,34 @@ end
--挑战副本显示信息
function this.ChallengeCopyShow()
local data = CarbonManager.GetBattleResult()
for i = 1, 3 do
Util.GetGameObject(this.qiJieCondition,"Text ("..i..")"):GetComponent("Text").text = data[i]
Util.GetGameObject(this.challengeInfo,"layout/rounds"):GetComponent("Text").text= data[1]
local progressBar= Util.GetGameObject(this.challengeInfo,"layout/progressBg/progressBar"):GetComponent("Image")
progressBar.fillAmount = data[2]
local scoreTextArr = {"良好","优秀","史诗","传说","神话"}
local scoreImageArr = {"r_hero_tujian_lianghao","r_hero_tujian_youxiu","r_hero_tujian_shishi","r_hero_tujian_chuanshuo","r_hero_tujian_shenhua"}
local scoreText= Util.GetGameObject(this.challengeInfo,"layout/progressBg/scoreText")
local boutNum= Util.GetGameObject(this.challengeInfo,"layout/progressBg/boutNum")
local lvArr=data[3]
local scoreImage=Util.GetGameObject(this.challengeInfo,"layout/Image"):GetComponent("Image")
for i = 1, #lvArr do
local configRound=lvArr[i][1]
local progressText=scoreText.transform:GetChild(i-1)
local scoreLine=configRound/20
if data[4]==2 then
scoreLine=(20-configRound)/20
end
local textX=742*scoreLine
if data[2]>=scoreLine then
scoreImage.sprite=this.spLoader:LoadSprite(scoreImageArr[i])
end
progressText:GetComponent("Text").text = scoreTextArr[i]
progressText:GetComponent("RectTransform").anchoredPosition = Vector2.New(textX,27)
local boutText=boutNum.transform:GetChild(i-1)
boutText:GetComponent("Text").text = configRound
boutText:GetComponent("RectTransform").anchoredPosition = Vector2.New(textX,-35)
end
end
--当前背包是否已满