【spLoader】处理一些白片问题

dev_chengFeng
gaoxin 2021-04-22 18:26:48 +08:00
parent d9640a660c
commit 868643f87c
5 changed files with 17 additions and 2 deletions

View File

@ -17,14 +17,16 @@ function BagPanel:InitComponent()
this.spLoader = SpriteLoader.New()
this.BtnBack = Util.GetGameObject(self.transform, "rightUp/btnBack")
for i = 0, 7 do
for i = 1, 7 do
tabs1[i] = Util.GetGameObject(self.transform, "box/Btn" .. i)
tabs1RedPoint[i] = Util.GetGameObject(self.transform, "box/Btn" .. i .. "/redPoint")
tabs1[i]:GetComponent("Image").sprite = this.spLoader:LoadSprite("r_hero_xuanze_002")
end
if not this.playerInfoView then
this.playerInfoView = SubUIManager.Open(SubUIConfig.PlayerInfoView, this.transform)
end
this.selectBtn1 = Util.GetGameObject(self.gameObject, "selectBtn")
this.selectBtn1:GetComponent("Image").sprite = this.spLoader:LoadSprite("r_hero_xuanze_001")
this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.gameObject.transform)
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
this.fenJieBtn = Util.GetGameObject(self.gameObject, "fenJieBtn")
@ -50,7 +52,7 @@ function BagPanel:BindEvent()
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
self:ClosePanel()
end)
for i = 0, 7 do
for i = 1, 7 do
Util.AddClick(tabs1[i], function()
if this.isFristOpen == false then
if i == sortIndex then

View File

@ -594,6 +594,7 @@ function this.BattleOrderChange(order)
enemyLivePos.localScale = Vector3.zero
local myPos = Util.GetTransform(this.PlayerPanel, "View/"..i.."/root")
myPos:GetComponent("Image").sprite = this.spLoader:LoadSprite("bd_xinkapaifan")
myPos.localScale = Vector3.one
end

View File

@ -70,6 +70,7 @@ local orginLayer
local orginLayer1
local orginLayer2
local list = {}
local tabsImg = {"z_icon_01_zh", "r_hero_huo 1_zh", "r_hero_feng 1_zh", "r_hero_shui 1_zh", "r_hero_dadi 1_zh"}
--初始化组件(用于子类重写)
function this:InitComponent()
this.spLoader = SpriteLoader.New()

View File

@ -36,6 +36,7 @@ local tempPowerNum=0 --临时战力
local panelType
local tabsImg = {"z_icon_01_zh", "r_hero_huo 1_zh", "r_hero_feng 1_zh", "r_hero_shui 1_zh", "r_hero_dadi 1_zh"}
-- 各个类型编队系统逻辑列表
this.PanelOptionView = {
[FORMATION_TYPE.CARBON] = "Modules/Formation/View/CarbonFormation",
@ -70,6 +71,7 @@ function this:InitComponent()
this.effect = Util.GetGameObject(this.gameObject, "effect")
this.power = Util.GetGameObject(this.gameObject, "Power/Value"):GetComponent("Text")
this.root=Util.GetGameObject(this.gameObject,"Root")
Util.GetGameObject(this.gameObject, "Power"):GetComponent("Image").sprite = this.spLoader:LoadSprite("t_tongyong-zhanli_zh")
this.roleGrid=Util.GetGameObject(this.gameObject,"RoleGrid")
this.line=Util.GetGameObject(this.gameObject,"RoleGrid/Line")
@ -108,6 +110,9 @@ function this:InitComponent()
--筛选按钮
for i = 0, 4 do
tabs[i] = Util.GetGameObject(this.gameObject, "Tabs/Grid/Btn" .. i)
if tabsImg[i + 1] then
Util.GetGameObject(tabs[i], "Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(tabsImg[i + 1])
end
end
this.selectBtn = Util.GetGameObject(this.gameObject, "Tabs/SelectBtn")

View File

@ -8,6 +8,7 @@ local teamHero = {}
local roleDatas={}
this.isFirstOpen=true
local tabs = {}
local tabsImg = {"z_icon_01_zh", "r_hero_huo 1_zh", "r_hero_feng 1_zh", "r_hero_shui 1_zh", "r_hero_dadi 1_zh"}
local soulPrintData={}
local orginLayer = 0
local orginLayer2 = 0
@ -23,10 +24,15 @@ function RoleListPanel:InitComponent()
this.btnPrant = Util.GetGameObject(self.gameObject, "Tabs")
for i = 0, 6 do
tabs[i] = Util.GetGameObject(self.transform, "Tabs/grid/Btn" .. i)
if tabsImg[i + 1] then
Util.GetGameObject(tabs[i], "Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(tabsImg[i + 1])
end
end
this.ShaiXuanBtn = Util.GetGameObject(self.gameObject, "ShaiXuanBtn")
this.ShaiXuanBtnLv = Util.GetGameObject(self.gameObject, "ShaiXuanBtn/Lv")
this.ShaiXuanBtnLv:GetComponent("Image").sprite = this.spLoader:LoadSprite("r_tongyong_dengjiqiehuan_zh")
this.ShaiXuanBtnQu = Util.GetGameObject(self.gameObject, "ShaiXuanBtn/Qu")
this.ShaiXuanBtnQu:GetComponent("Image").sprite = this.spLoader:LoadSprite("r_tongyong_pingjieqiehuan_zh")
this.selectBtn = Util.GetGameObject(self.gameObject, "Tabs/selectBtn")
this.heroNumText = Util.GetGameObject(self.gameObject, "heroNum")
this.ScrollBar = Util.GetGameObject(self.gameObject, "Scrollbar"):GetComponent("Scrollbar")