eeeeeeee
parent
159f2e2494
commit
3257b89e70
|
@ -12,7 +12,7 @@ GameObject:
|
|||
- component: {fileID: 223004754372590400}
|
||||
- component: {fileID: 114372824615027968}
|
||||
m_Layer: 0
|
||||
m_Name: ArenaRecordPopup
|
||||
m_Name: WorldArenaRecordPopup
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
@ -345,7 +345,7 @@ RectTransform:
|
|||
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: 194.01, y: -2.9}
|
||||
m_AnchoredPosition: {x: 350.1, y: 43.2}
|
||||
m_SizeDelta: {x: 130.79, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &222929285231308004
|
||||
|
@ -383,13 +383,13 @@ MonoBehaviour:
|
|||
m_BestFit: 1
|
||||
m_MinSize: 26
|
||||
m_MaxSize: 34
|
||||
m_Alignment: 5
|
||||
m_Alignment: 3
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: +15
|
||||
m_Text: "\u79EF\u5206+15"
|
||||
--- !u!1 &1302819781731396
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1087,7 +1087,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &224170130709635840
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -232,6 +232,10 @@ function WorldArenaBattleInfoPanel:BindEvent()
|
|||
this.btnText.text="确定"
|
||||
end
|
||||
end)
|
||||
--添加奖励 --
|
||||
if msg.drop then
|
||||
WorldArenaManager.AddReward(msg.drop)
|
||||
end
|
||||
-- for i = 1, #this.playBacks do
|
||||
-- this.playBacks[i]:SetActive(true)
|
||||
-- end
|
||||
|
@ -345,7 +349,9 @@ function WorldArenaBattleInfoPanel:OnOpen(msg,_type,closeFunc,list)
|
|||
if list then
|
||||
state=3
|
||||
resultList=list
|
||||
|
||||
for i = 1, 3 do
|
||||
this.playBacks[i]:SetActive(true)
|
||||
this.ShowBattleState(i,3)
|
||||
end
|
||||
end
|
||||
|
@ -355,6 +361,9 @@ function this.ShowInfo(msg)
|
|||
--我的信息
|
||||
myInfoData=msg.myTeamInfo
|
||||
enInfoData=msg.defTeamInfo
|
||||
if msg.fightData then
|
||||
fightDataList=msg.fightData
|
||||
end
|
||||
this.myName.text= PracticeManager.SetNameColor(JingJiShouWeiToEn(PlayerManager.nickName),msg.myTeamInfo.practiceLevel)
|
||||
this.myServer.text= PracticeManager.SetNameColor(PlayerManager.serverInfo.name,1)
|
||||
this.myRankImg.sprite=this.spLoader:LoadSprite("y_yuxulundao_xiaobiao_0"..1)
|
||||
|
|
|
@ -175,6 +175,7 @@ function WorldArenaMainPanel:OnOpen(...)
|
|||
local args = {...}
|
||||
NetManager.CrossYuXuLunDaoGetInfoRequest(function(msg)
|
||||
local currRankId=msg.newLevelId
|
||||
LogError(" newMyscore=="..msg.newMyscore)
|
||||
grid, rankData=WorldArenaManager.GetRankImgByScore(msg.newMyscore)
|
||||
--rankData=ConfigManager.GetConfigData(ConfigName.MServerRankConfig,currRankId)
|
||||
battleTimes=msg.changedTimes
|
||||
|
@ -327,11 +328,14 @@ function this:RefreshEnemyData(team)
|
|||
SecTorPlayAnim(prefab)
|
||||
end
|
||||
|
||||
|
||||
function WorldArenaMainPanel:OnFocus()
|
||||
LogError("************//////")
|
||||
end
|
||||
|
||||
-- 打开,重新打开时回调
|
||||
function WorldArenaMainPanel:OnShow()
|
||||
SoundManager.PlayMusic(SoundConfig.BGM_Arena)
|
||||
LogError("**********")
|
||||
end
|
||||
|
||||
function WorldArenaMainPanel:OnSortingOrderChange()
|
||||
|
|
|
@ -3,14 +3,55 @@ local this = WorldArenaManager
|
|||
local ArenaSetting = ConfigManager.GetConfig(ConfigName.MServerArenaSetting)
|
||||
local rankConfig = ConfigManager.GetConfig(ConfigName.MServerRankConfig)
|
||||
|
||||
local oldScore=0
|
||||
local newScore=0
|
||||
local freeTimes
|
||||
local myRankId=0
|
||||
local challengeTime=0
|
||||
local rewardList={}
|
||||
function this.Initialize()
|
||||
this.rank=0
|
||||
this.star=0
|
||||
|
||||
rewardList={}
|
||||
|
||||
end
|
||||
|
||||
local freeTimes
|
||||
|
||||
--添加奖励
|
||||
function this.AddReward(drop)
|
||||
if drop.itemlist then
|
||||
for i = 1, #drop do
|
||||
for j = 1, #drop[i].itemlist do
|
||||
local item={}
|
||||
item.itemId=drop[i].itemlist[j].itemId
|
||||
item.itemNum=drop[i].itemlist[j].itemNum
|
||||
table.insert(rewardList,item)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function this.SetMyData(rank,free,time)
|
||||
myRankId=rank
|
||||
freeTimes=free
|
||||
challengeTime=time
|
||||
end
|
||||
|
||||
function this.SetOldScore(num)
|
||||
oldScore=num
|
||||
end
|
||||
|
||||
function this.GetOldScore()
|
||||
return oldScore
|
||||
end
|
||||
|
||||
function this.SetNewScore(num)
|
||||
newScore=num
|
||||
end
|
||||
|
||||
function this.GetNewScore()
|
||||
return newScore
|
||||
end
|
||||
|
||||
function this.SetFreeTime(num)
|
||||
freeTimes=num
|
||||
end
|
||||
|
@ -42,7 +83,7 @@ function this.GetRankImgByScore(num)
|
|||
return v.RankGrade+1,v
|
||||
end
|
||||
end
|
||||
return 1
|
||||
return 1,rankConfig[1]
|
||||
end
|
||||
|
||||
local _StarShow = {
|
||||
|
|
|
@ -6,6 +6,7 @@ local type=0 --1:挑战 2:详情
|
|||
local itemId, needNum
|
||||
local haveNum=0
|
||||
local time=0
|
||||
local enemyId
|
||||
function WorldArenaOtherTeamPanel:InitComponent()
|
||||
self.spLoader = SpriteLoader.New()
|
||||
self.btnBack = Util.GetGameObject(self.gameObject, "Frame/BackBtn")
|
||||
|
@ -62,6 +63,12 @@ function WorldArenaOtherTeamPanel:BindEvent()
|
|||
PopupTipPanel.ShowTip("邀请函不足!")
|
||||
return
|
||||
end
|
||||
NetManager.CrossYuXuLunDaoChallengeBeforeRequest(PlayerManager.uid,self.playerId,function(msg)
|
||||
LogError("open battleinfo ???")
|
||||
UIManager.OpenPanel(UIName.WorldArenaBattleInfoPanel,msg,1, function()
|
||||
--self:RefreshChallengeList()
|
||||
end)
|
||||
end)
|
||||
--显示挑战界面
|
||||
self:ClosePanel()
|
||||
end)
|
||||
|
|
|
@ -201,8 +201,8 @@ function this.RankNodeAdapter(node, data)
|
|||
end
|
||||
windData.myTeamInfo=myTeamInfo
|
||||
windData.defTeamInfo=enTeamInfo
|
||||
|
||||
UIManager.OpenPanel(UIName.WorldArenaBattleInfoPanel,windData,2,data.resultList)
|
||||
windData.fightData=fightDataList
|
||||
UIManager.OpenPanel(UIName.WorldArenaBattleInfoPanel,windData,2,nil,data.resultList)
|
||||
end)
|
||||
|
||||
end
|
||||
|
|
|
@ -3,14 +3,15 @@ WorldArenaUpRewardPanel = Inherit(BasePanel)
|
|||
local this = WorldArenaUpRewardPanel
|
||||
local RankConfig=ConfigManager.GetConfig(ConfigName.MServerRankConfig)
|
||||
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
local lastRankId=10
|
||||
local currRankId=12
|
||||
local lastScore=180
|
||||
local currScore=212
|
||||
local lastRankId=0
|
||||
local currRankId=0
|
||||
local lastScore=0
|
||||
local currScore=0
|
||||
local rankData
|
||||
local maxScore
|
||||
local minScore
|
||||
local layer
|
||||
local aaa
|
||||
--初始化组件(用于子类重写)
|
||||
function WorldArenaUpRewardPanel:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
|
@ -50,7 +51,12 @@ function WorldArenaUpRewardPanel:OnOpen(...)
|
|||
else
|
||||
this.titleObj.gameObject:SetActive(false)
|
||||
end
|
||||
rankData=RankConfig[lastRankId]
|
||||
lastScore=PlayerPrefs.GetInt(PlayerManager.uid.."yuxulundaoScore")
|
||||
aaa, rankData=WorldArenaManager.GetRankImgByScore(lastScore)
|
||||
lastRankId=rankData.Id
|
||||
local grade, newRankData=WorldArenaManager.GetRankImgByScore(currScore)
|
||||
currRankId=newRankData.Id
|
||||
--rankData=RankConfig[lastRankId]
|
||||
minScore=rankData.ScoreLow
|
||||
maxScore=rankData.ScoreUp
|
||||
currRank= rankData.RankGrade+1
|
||||
|
@ -72,12 +78,7 @@ function WorldArenaUpRewardPanel:OnOpen(...)
|
|||
local itemRandomDataList={}
|
||||
local aaa={}
|
||||
aaa.itemlist={}
|
||||
for i = 1, 10 do
|
||||
local item={}
|
||||
item.itemId=16
|
||||
item.itemNum=100
|
||||
table.insert(aaa.itemlist,item)
|
||||
end
|
||||
aaa.itemlist=WorldArenaManager.rewardList
|
||||
itemRandomDataList=BagManager.GetTableByBackDropData(aaa)
|
||||
local baseContentList2={}
|
||||
this.SetItemShow(aaa,itemRandomDataList,this.grid.transform,callList2,baseContentList2)
|
||||
|
@ -89,7 +90,6 @@ end
|
|||
function this.SetStarShow(star,grade,layer)
|
||||
-- 设置星级
|
||||
WorldArenaManager.SetStarShow(this.starList, rankData.RankLevel)
|
||||
|
||||
if currRank~=grade then
|
||||
if titleLive then
|
||||
destroy(titleLive)
|
||||
|
@ -170,9 +170,7 @@ function this.StartProgressChange(func)
|
|||
if this.TimeCounter then
|
||||
this.TimeCounter=nil
|
||||
end
|
||||
if lastRankId>currRankId then
|
||||
num=lastRankId-currRankId
|
||||
end
|
||||
|
||||
local function _TimeUpdate()
|
||||
--降低
|
||||
if lastScore<currScore then
|
||||
|
@ -223,6 +221,8 @@ function this.OnClose()
|
|||
if this.TimeCounter then
|
||||
this.TimeCounter:Stop()
|
||||
this.TimeCounter = nil
|
||||
WorldArenaManager.rewardList={}
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."yuxulundaoScore",currScore)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue