bug修改

dev_chengFeng
wangzhenxing 2021-10-15 15:47:55 +08:00
parent 09ef1c8981
commit d1796fdab6
3 changed files with 13 additions and 5 deletions

View File

@ -136,6 +136,7 @@ function WorldArenaBattleInfoPanel:InitComponent()
this.enTeamInfo=Util.GetGameObject(self.transform, "BG/enInfo")
this.effect=Util.GetGameObject(self.transform, "BG/Effect")
this.effect:SetActive(false)
this.hintTxt=Util.GetGameObject(self.transform, "BG/hintTxt"):GetComponent("Text")
screenAdapte(this.effect)
--我方阵营
this.leftTeam={}
@ -290,8 +291,8 @@ function WorldArenaBattleInfoPanel:BindEvent()
end)
this.myScore.gameObject:SetActive(true)
this.enScore.gameObject:SetActive(true)
this.myScore.text= msg.myScore>0 and "积分 "..myOldScore .."+"..msg.myScore or "积分 "..myOldScore .."-"..msg.myScore
this.enScore.text= msg.defScore>0 and "积分 "..enOldScore .."+"..msg.defScore or "积分 "..enOldScore .."-"..msg.defScore
this.myScore.text= msg.myScore>0 and "积分 "..myOldScore .."+"..msg.myScore or "积分 "..myOldScore .." "..msg.myScore
this.enScore.text= msg.defScore>0 and "积分 "..enOldScore .."+"..msg.defScore or "积分 "..enOldScore .." "..msg.defScore
-- this.myScore.text= msg.myScore>0 and "积分+"..msg.myScore or "积分"..msg.myScore
this.myScore.color = msg.myScore>0 and UIColor.GREEN or UIColor.RED
--this.enScore.text= msg.defScore>0 and "积分+"..msg.defScore or "积分"..msg.defScore
@ -401,7 +402,9 @@ function WorldArenaBattleInfoPanel:OnOpen(msg,_type,closeFunc,list)
end
--this.myScore.gameObject:SetActive(false)
--this.enScore.gameObject:SetActive(false)
this.hintTxt.gameObject:SetActive(true)
elseif state==3 then
this.hintTxt.gameObject:SetActive(false)
this.myScore.gameObject:SetActive(true)
this.enScore.gameObject:SetActive(true)
for i = 1, 3 do
@ -468,8 +471,8 @@ function this.ShowInfo(msg)
end
if state==3 then
if type==1 then
this.myScore.text= msg.myScore>0 and "积分 "..msg.myTeamInfo.crossTeamScore .."+"..msg.myScore or "积分 "..msg.myTeamInfo.crossTeamScore .."-"..msg.myScore
this.enScore.text= msg.defScore>0 and "积分 "..msg.defTeamInfo.crossTeamScore .."+"..msg.defScore or "积分 "..msg.defTeamInfo.crossTeamScore .."-"..msg.defScore
this.myScore.text= msg.myScore>0 and "积分 "..msg.myTeamInfo.crossTeamScore .."+"..msg.myScore or "积分 "..msg.myTeamInfo.crossTeamScore .." "..msg.myScore
this.enScore.text= msg.defScore>0 and "积分 "..msg.defTeamInfo.crossTeamScore .."+"..msg.defScore or "积分 "..msg.defTeamInfo.crossTeamScore .." "..msg.defScore
else
this.myScore.text= msg.myScore>0 and "积分+"..msg.myScore or "积分"..msg.myScore
this.enScore.text= msg.defScore>0 and "积分+"..msg.defScore or "积分"..msg.defScore

View File

@ -141,7 +141,7 @@ function WorldArenaMainPanel:BindEvent()
end)
-- 奖励按钮
Util.AddClick(this.RewardBtn, function()
UIManager.OpenPanel(UIName.WorldArenaRankRewardPanel,myRank)
UIManager.OpenPanel(UIName.WorldArenaRankRewardPanel,WorldArenaManager.GetMyRank())
end)
--商店按钮
Util.AddClick(this.StoreBtn, function()

View File

@ -46,6 +46,11 @@ function this.SetMyData(rank,time)
challengeTime=time
end
function this.GetMyRank()
return myRankId
end
function this.SetRewardData(data,time)
rewardState=data
challengeTime=time