四灵提交

dev_chengFeng
jiaoyangna 2021-02-07 16:36:54 +08:00
parent a5c837d8a7
commit a0ffc1244b
3 changed files with 6655 additions and 6652 deletions

View File

@ -125,6 +125,7 @@ end
function this.SetSingleMonster(id)
local herodata = {}
local _configData = ConfigManager.GetConfigData(ConfigName.HeroConfig,id)
herodata.heroConfig = _configData
herodata.heroViewConfig = _configData
herodata.live = GetResourcePath(_configData.Live)
herodata.painting = GetResourcePath(_configData.Painting)

View File

@ -26,12 +26,13 @@ function FourElementSingleWave:InitComponent(go,_data,_curType)
self.bg = Util.GetGameObject(go,"bg"):GetComponent("Image")
self.rewardGrid = Util.GetGameObject(self.reward,"grid")
self.frame=Util.GetGameObject(self.hero,"Bg1"):GetComponent("Image")
--self.icon=Util.GetGameObject(self.hero, "Mask/icon"):GetComponent("RawImage")
self.icon=Util.GetGameObject(self.hero, "Mask/icon"):GetComponent("Image")
self.icon=Util.GetGameObject(self.hero, "Mask/icon"):GetComponent("RawImage")
--self.icon=Util.GetGameObject(self.hero, "Mask/icon"):GetComponent("Image")
self.lv = Util.GetGameObject(self.hero, "lv/Text"):GetComponent("Text")
self.pro = Util.GetGameObject(self.hero, "Pro/Image"):GetComponent("Image")
self.fg = Util.GetGameObject(self.hero,"Bg2"):GetComponent("Image")
self.starGrid = Util.GetGameObject(self.hero,"starGrid")
--self.starGrid = Util.GetGameObject(self.hero,"starGrid")
self.starGrid = Util.GetGameObject(self.hero,"StarGrid")
self.name=Util.GetGameObject(self.hero,"Name/Text"):GetComponent("Text")
self.data = _data
@ -78,7 +79,10 @@ function FourElementSingleWave:OnOpen()
Util.AddOnceClick(self.pass.gameObject, function()
UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.trailData.fourElementType,self.data.wave)
end)
Util.AddOnceClick(self.hero, function()
-- Util.AddOnceClick(self.hero, function()
-- UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.trailData.fourElementType,self.data.wave)
-- end)
Util.AddOnceClick(self.frame.gameObject, function()
UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.trailData.fourElementType,self.data.wave)
end)
Util.AddOnceClick(self.fight, function()
@ -140,16 +144,16 @@ end
--设置每条英雄数据
function FourElementSingleWave:SingleHeroDataShow(monConfig,heroData)
self.frame.sprite=Util.LoadSprite(GetHeroCardStarBg[monConfig.Star])
-- local liveName = heroData.live
-- local roleConfig = ConfigManager.GetConfigData(ConfigName.RoleConfig, heroData.heroConfig.Id)
-- local scale = roleConfig.play_liveScale
-- local livePos = Vector3.New(roleConfig.offset[1], roleConfig.offset[2], 0)
-- self.icon.texture = CardRendererManager.GetSpineTexture(1, liveName, Vector3.one * scale, livePos, true)
-- self.icon.transform.localScale = Vector3.one
-- self.icon.transform.localPosition = Vector3.zero
local liveName = heroData.live
local roleConfig = ConfigManager.GetConfigData(ConfigName.RoleConfig, heroData.heroConfig.Id)
local scale = roleConfig.play_liveScale
local livePos = Vector3.New(roleConfig.offset[1], roleConfig.offset[2], 0)
self.icon.texture = CardRendererManager.GetSpineTexture((self.data.wave%6 == 0 and 6 or self.data.wave%6), liveName, Vector3.one * scale, livePos, true)
self.icon.transform.localScale = Vector3.one
self.icon.transform.localPosition = Vector3.zero
self.lv.text = monConfig.Level
self.pro.sprite= Util.LoadSprite(GetProStrImageByProNum(heroData.property))
self.icon.sprite = Util.LoadSprite(heroData.painting)
--self.icon.sprite = Util.LoadSprite(heroData.painting)
SetCardStars(self.starGrid,monConfig.Star)
self.fg.sprite = Util.LoadSprite(GetHeroCardStarFg[monConfig.Star])
self.name.text = heroData.name