From 3369bcc73cc84d69efd19e4fb4946509b5eba0a3 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Fri, 14 Jan 2022 18:40:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=83=E6=84=BF=E4=BF=AE=E6=94=B9=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagedResources/~Lua/Common/functions.lua | 17 +++++++++++++++++ .../View/GeneralBigPopup_WishDraw.lua | 7 +++---- .../~Lua/Modules/Recruit/RecruitPanelNew.lua | 1 + 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Common/functions.lua b/Assets/ManagedResources/~Lua/Common/functions.lua index 3b20cd0337..2527d7e1b5 100644 --- a/Assets/ManagedResources/~Lua/Common/functions.lua +++ b/Assets/ManagedResources/~Lua/Common/functions.lua @@ -863,6 +863,23 @@ function GetStr(data) return str end +function GetBgByHeroNatural(id) + if id == 1 then + return "r_characterbg_goden" + elseif id == 2 then + return "r_characterbg_goden" + elseif id == 3 then + return "r_characterbg_goden" + elseif id == 4 then + return "r_characterbg_goden" + elseif id == 5 then + return "r_characterbg_gules" + elseif id == 6 then + return "t_tongyong_topkaung" + elseif id == 7 then + return "t_tongyong_topkaung" + end +end --通过item稀有度读取背景框 function GetQuantityImageByquality(quality,star) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua index 5ed3234e77..9b6bdd5114 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua @@ -25,7 +25,7 @@ function this:InitComponent(gameObject) for i = 1, 3 do self.wishListObj[i] = Util.GetGameObject(gameObject,"wishList/hero ("..i..")") self.bgObjlist[i] = Util.GetGameObject(gameObject,"Bg/bglist/obj"..i) - Util.GetGameObject(self.bgObjlist[i], "frame"):GetComponent("Image").sprite = self.spLoader:LoadSprite("t_tongyong_topkaung") + Util.GetGameObject(self.bgObjlist[i], "frame"):GetComponent("Image").sprite = self.spLoader:LoadSprite("r_characterbg_goden") end --tabList self.tabListObj = {} @@ -99,7 +99,6 @@ function this:SetUpHero() for i = 1, 3 do local go = self.wishListObj[i] local frame = Util.GetGameObject(go, "frame"):GetComponent("Image") - frame.sprite = self.spLoader:LoadSprite("t_tongyong_topkaung") local icon = Util.GetGameObject(go, "icon"):GetComponent("Image") local proIcon = Util.GetGameObject(go, "proIcon"):GetComponent("Image") local starGrid = Util.GetGameObject(go, "star") @@ -109,7 +108,7 @@ function this:SetUpHero() if heroId > 0 then go:SetActive(true) local heroData = heroConfig[heroId] - + frame.sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(heroData.Natural)) icon.sprite = self.spLoader:LoadSprite(GetResourcePath(heroData.Icon)) proIcon.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.PropertyName)) SetHeroStars(self.spLoader,starGrid, heroData.Star) @@ -142,7 +141,7 @@ end function this:ShowSingleHero(go,data,index) local heroData = heroConfig[data.Reward[1]] self.itemList[self.curSelect][index] = go - Util.GetGameObject(go, "frame"):GetComponent("Image").sprite = self.spLoader:LoadSprite("t_tongyong_topkaung") + Util.GetGameObject(go, "frame"):GetComponent("Image").sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(heroData.Natural)) Util.GetGameObject(go, "icon"):GetComponent("Image").sprite = self.spLoader:LoadSprite(GetResourcePath(heroData.Icon)) Util.GetGameObject(go, "proIcon"):GetComponent("Image").sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.PropertyName)) Util.GetGameObject(go, "name"):GetComponent("Text").text = heroData.ReadingName diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanelNew.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanelNew.lua index 505423a0b4..f5fe87f53f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanelNew.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanelNew.lua @@ -201,6 +201,7 @@ function RecruitPanelNew:UpdataWishPanel() if id > 0 then self.upHeroPreList[i].item.gameObject:SetActive(true) self.upHeroPreList[i].item:OnOpen(false, {id,0},1, false, false, false, self.sortingOrder) + self.upHeroPreList[i].item.frame.sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(ConfigManager.GetConfigData(ConfigName.HeroConfig,id).Natural)) self.upHeroPreList[i].choosed:SetActive(data.status == 1) else self.upHeroPreList[i].item.gameObject:SetActive(false)