巅峰赛神魂图标提交

dev_chengFeng
jiaoyangna 2021-11-04 11:35:15 +08:00
parent 3a1139c0a0
commit f9f92262a8
4 changed files with 69 additions and 37 deletions

View File

@ -105,12 +105,13 @@ function ArenaTopMatchPanel:OnShow()
this.TabCtrl:ChangeTab(this._CurTabIndex)
end
SoundManager.PlayMusic(SoundConfig.BGM_Arena)
commonInfo:OnSortingOrderChange(self.sortingOrder)
end
this.cursortingOrder=0
function ArenaTopMatchPanel:OnSortingOrderChange()
commonTitle:OnSortingOrderChange()
commonInfo.OnSortingOrderChange(self.sortingOrder)
--Log("<color=yellow>打开主版面时 层级为"..self.sortingOrder.."</color>")
this.cursortingOrder = self.sortingOrder
@ -133,7 +134,7 @@ end
--界面销毁时调用(用于子类重写)
function ArenaTopMatchPanel:OnDestroy()
commonTitle:OnDestroy()
commonInfo.OnDestroy()
SubUIManager.Close(this.UpView)
-- 调用销毁方法
for index, logic in pairs(this.ViewLogicList) do

View File

@ -21,7 +21,6 @@ local resultRes = {
[1] = {name = "UI_effect_JJC_JieSuan_ShengLi_png_zh"},
}
--------- 走 UI界面流程部分 ------------------------------
function this.InitComponent(root)
@ -63,11 +62,23 @@ function this.InitComponent(root)
-- 5个我的它
this.myBaby = {}
for i = 1, 6 do
this.myBaby[i] = Util.GetGameObject(root.gameObject, "ATM_CommonPart/formatRoot/myFormat/Demons/heroPro (" .. i .. ")")
this.myBaby[i] = {}
this.myBaby[i].go = Util.GetGameObject(root.gameObject, "ATM_CommonPart/formatRoot/myFormat/Demons/heroPro (" .. i .. ")")
this.myBaby[i].frame = Util.GetGameObject(this.myBaby[i].go, "frame"):GetComponent("Image")
this.myBaby[i].hero = Util.GetGameObject(this.myBaby[i].go, "hero")
this.myBaby[i].levelText = Util.GetGameObject(this.myBaby[i].hero, "lvbg/levelText"):GetComponent("Text")
this.myBaby[i].icon = Util.GetGameObject(this.myBaby[i].hero, "icon"):GetComponent("Image")
this.myBaby[i].proIcon = Util.GetGameObject(this.myBaby[i].hero, "proIcon"):GetComponent("Image")
end
this.damnEvil = {}
for a = 1, 6 do
this.damnEvil[a] = Util.GetGameObject(root.gameObject, "ATM_CommonPart/formatRoot/otherFormat/Demons/heroPro (" .. a .. ")")
this.damnEvil[a] = {}
this.damnEvil[a].go = Util.GetGameObject(root.gameObject, "ATM_CommonPart/formatRoot/otherFormat/Demons/heroPro (" .. a .. ")")
this.damnEvil[a].frame = Util.GetGameObject(this.damnEvil[a].go, "frame"):GetComponent("Image")
this.damnEvil[a].hero = Util.GetGameObject(this.damnEvil[a].go, "hero")
this.damnEvil[a].levelText = Util.GetGameObject(this.damnEvil[a].hero, "lvbg/levelText"):GetComponent("Text")
this.damnEvil[a].icon = Util.GetGameObject(this.damnEvil[a].hero, "icon"):GetComponent("Image")
this.damnEvil[a].proIcon = Util.GetGameObject(this.damnEvil[a].hero, "proIcon"):GetComponent("Image")
end
-- 点击编队
this.btnBlueFormat = Util.GetGameObject(root.gameObject, "ATM_CommonPart/formatRoot/myFormat/orggroup")
@ -259,47 +270,45 @@ end
function this.FreshTeam(formation, isBlue)
local teamRoot = isBlue and this.myBaby or this.damnEvil
for i, demon in ipairs(teamRoot) do
Util.GetGameObject(demon, "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(1))
Util.GetGameObject(demon, "hero"):SetActive(false)
demon.frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(1))
demon.hero:SetActive(false)
end
for i, hero in ipairs(formation.team) do
local heroData = hero
local heroGo = Util.GetGameObject(teamRoot[heroData.position], "hero")
heroGo:SetActive(true)
Util.GetGameObject(heroGo, "lvbg/levelText"):GetComponent("Text").text = heroData.level
teamRoot[heroData.position].hero:SetActive(true)
teamRoot[heroData.position].levelText.text = heroData.level
local star,starType = GetStarOrGodSoulLv(1,heroData)
SetHeroStars(this.spLoader, Util.GetGameObject(heroGo, "starGrid"), star,starType)
SetHeroStars(this.spLoader,teamRoot[heroData.position].starGrid, star,starType)
local demonId = heroData.heroTid
local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, demonId)
Util.GetGameObject(teamRoot[heroData.position], "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(heroConfig.Quality,heroData.star))
teamRoot[heroData.position].frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(heroConfig.Quality,heroData.star))
-- if not heroData.skinId or heroData.skinId == 0 then
-- Util.GetGameObject(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(heroConfig.Icon))
-- Util.GetGameObject(teamRoot[heroData.position].hero, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(heroConfig.Icon))
-- else
-- local heroSkinconfig = ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",heroData.skinId)
-- Util.GetGameObject(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(heroSkinconfig.Icon))
-- Util.GetGameObject(teamRoot[heroData.position].hero, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(heroSkinconfig.Icon))
-- end
SetHeroIcon(this.spLoader, heroData,Util.GetGameObject(heroGo, "icon"):GetComponent("Image"),heroConfig)
Util.GetGameObject(heroGo, "proIcon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
SetHeroIcon(this.spLoader, heroData,teamRoot[heroData.position].icon,heroConfig)
teamRoot[heroData.position].proIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
end
end
--根据前端数据显示编队
function this.FreshTeam2(formation, isBlue)
local teamRoot = isBlue and this.myBaby or this.damnEvil
for i, demon in ipairs(teamRoot) do
Util.GetGameObject(demon, "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(1))
Util.GetGameObject(demon, "hero"):SetActive(false)
demon.frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(1))
demon.hero:SetActive(false)
end
for i, hero in ipairs(formation.teamHeroInfos) do
local heroData = HeroManager.GetSingleHeroData(formation.teamHeroInfos[i].heroId)
local heroGo = Util.GetGameObject(teamRoot[formation.teamHeroInfos[i].position], "hero")
heroGo:SetActive(true)
Util.GetGameObject(heroGo, "lvbg/levelText"):GetComponent("Text").text = heroData.lv
teamRoot[heroData.position].hero:SetActive(true)
teamRoot[heroData.position].levelText.text = heroData.lv
local star,starType = heroData.GetStar(1)
SetHeroStars(this.spLoader, Util.GetGameObject(heroGo, "starGrid"), star,starType)
SetHeroStars(this.spLoader, teamRoot[heroData.position].starGrid, star,starType)
local heroConfig = heroData.heroConfig
Util.GetGameObject(teamRoot[formation.teamHeroInfos[i].position], "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(heroConfig.Quality,heroData.star))
Util.GetGameObject(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(heroData.icon)
Util.GetGameObject(heroGo, "proIcon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
teamRoot[heroData.position].frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(heroConfig.Quality,heroData.star))
heroData,teamRoot[heroData.position].icon.sprite = this.spLoader:LoadSprite(heroData.icon)
teamRoot[heroData.position].proIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
end
end
-- 控制显示编队信息
@ -312,4 +321,18 @@ function this.SetFormationShow(showType, showFormat)
end
function this.OnSortingOrderChange(sort)
for i, demon in ipairs(this.myBaby) do
Util.SetParticleSortLayer(demon.starGrid,sort + 1)
end
for i, demon in ipairs(this.damnEvil) do
Util.SetParticleSortLayer(demon.starGrid,sort + 1)
end
end
function this.OnDestroy()
this.myBaby = {}
this.damnEvil = {}
end
return this

View File

@ -317,7 +317,6 @@ end
--界面销毁时调用(用于子类重写)
function ATM_GuessView:OnDestroy()
this.spLoader:Destroy()
end
return ATM_GuessView

View File

@ -32,7 +32,14 @@ function ATM_MainMatchView:InitComponent()
this.Demons = Util.GetGameObject(self.gameObject, "contain/Demons")
this.myBaby = {}
for i = 1, 6 do
this.myBaby[i] = Util.GetGameObject(this.Demons,"heroPro (" .. i .. ")")
this.myBaby[i] = {}
this.myBaby[i].go = Util.GetGameObject(this.Demons,"heroPro (" .. i .. ")")
this.myBaby[i].frame = Util.GetGameObject(this.myBaby[i].go, "frame"):GetComponent("Image")
this.myBaby[i].hero = Util.GetGameObject(this.myBaby[i].go, "hero")
this.myBaby[i].levelText = Util.GetGameObject(this.myBaby[i].hero, "lvbg/levelText"):GetComponent("Text")
this.myBaby[i].starGrid = Util.GetGameObject(this.myBaby[i].hero, "starGrid")
this.myBaby[i].icon = Util.GetGameObject(this.myBaby[i].hero, "icon"):GetComponent("Image")
this.myBaby[i].proIcon = Util.GetGameObject(this.myBaby[i].hero, "proIcon"):GetComponent("Image")
end
end
@ -236,23 +243,21 @@ function this.FreshTeam()
end)
end)
for i, demon in ipairs(this.myBaby) do
Util.GetGameObject(demon, "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(1))
Util.GetGameObject(demon, "hero"):SetActive(false)
this.myBaby[i].frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(1))
this.myBaby[i].hero:SetActive(false)
end
local formation = FormationManager.GetFormationByID(FormationTypeDef.ARENA_TOM_MATCH)
for i, hero in ipairs(formation.teamHeroInfos) do
local heroData = HeroManager.GetSingleHeroData(hero.heroId)
-- LogError(hero.position)
local heroGo = Util.GetGameObject(this.myBaby[hero.position], "hero")
heroGo:SetActive(true)
Util.GetGameObject(heroGo, "lvbg/levelText"):GetComponent("Text").text = heroData.lv
this.myBaby[hero.position].hero:SetActive(true)
this.myBaby[hero.position].levelText.text = heroData.lv
local star,starType = heroData.GetStar(1)
SetHeroStars(this.spLoader, Util.GetGameObject(heroGo, "starGrid"), star,starType)
SetHeroStars(this.spLoader, this.myBaby[hero.position].starGrid, star,starType)
local demonId = heroData.id
local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, demonId)
Util.GetGameObject(this.myBaby[hero.position], "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(heroConfig.Quality,heroData.star))
Util.GetGameObject(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(heroData.icon)
Util.GetGameObject(heroGo, "proIcon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
this.myBaby[hero.position].frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(heroConfig.Quality,heroData.star))
this.myBaby[hero.position].icon.sprite = this.spLoader:LoadSprite(heroData.icon)
this.myBaby[hero.position].proIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
end
end
function this.SetNotJionInfo()
@ -309,6 +314,9 @@ local orginLayer = 0
function ATM_MainMatchView:OnSortingOrderChange(sort)
Util.AddParticleSortLayer(this.effect, sort - orginLayer)
orginLayer = sort
for i, demon in ipairs(this.myBaby) do
Util.SetParticleSortLayer(demon.starGrid,orginLayer + 1)
end
end
@ -324,6 +332,7 @@ end
--界面销毁时调用(用于子类重写)
function ATM_MainMatchView:OnDestroy()
this.spLoader:Destroy()
this.myBaby = {}
end