桃心位置修改

dev_chengFeng
jiaoyangna 2021-09-27 20:26:45 +08:00
parent 75049d619c
commit 2e2a0d6edd
1 changed files with 10 additions and 4 deletions

View File

@ -4,7 +4,11 @@ LikeAbilityPanel = Inherit(BasePanel)
--<size=32><color=#fc902c>特权</color></size>--橙色
--<size=32><color=#fed97f>总好感度属性:</color></size> --黄色
--<color=#5dc446>+500</color></size> --绿色
local pos = {["h_haogandu_1"] = Vector3.zero,["h_haogandu_2"] = Vector3.zero,["h_haogandu_3"] = Vector3.New(-16.15,0,0) }
local pos = {
["h_haogandu_1"] = {mask = Vector3.zero,icon = Vector3.New(-3.4,0,0)} ,
["h_haogandu_2"] = {mask = Vector3.zero,icon = Vector3.New(-3.4,0,0)} ,
["h_haogandu_3"] = {mask = Vector3.New(-16.15,0,0),icon = Vector3.New(-18.84,0,0)} ,
}
local sortOrder = 0
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"}
@ -33,8 +37,9 @@ function LikeAbilityPanel:InitComponent()
--h_haogandu_1 h_haogandu_2 h_haogandu_3
self.likeabilitymask = Util.GetGameObject(self.likeabilityDi.transform, "mask"):GetComponent("Image")
--self.likeabilitymask.fillAmount
self.lv = Util.GetGameObject(self.likeabilityBtn, "lv"):GetComponent("Text")
self.progress = Util.GetGameObject(self.likeabilityBtn, "progress"):GetComponent("Text")
self.icon = Util.GetGameObject(self.likeabilityBtn, "icon")
self.lv = Util.GetGameObject(self.likeabilityBtn, "icon/lv"):GetComponent("Text")
self.progress = Util.GetGameObject(self.likeabilityBtn, "icon/progress"):GetComponent("Text")
self.pro = Util.GetGameObject(self.transform, "di/pro")
self.proContent = Util.GetGameObject(self.pro, "content")
self.proGrid = Util.GetGameObject(self.transform, "di/proScroll")
@ -100,7 +105,8 @@ function LikeAbilityPanel:UpdateTopLayoutPanel()
local num,lv,totalNum = LikabilityManager.GetTotalHeroLikeLv(-1)
local config = ConfigManager.GetConfigDataByDoubleKey(ConfigName.LikeAbility,"Type",1,"Level",lv)
self.likeabilityDi.sprite = self.spLoader:LoadSprite(config.Bg)
self.likeabilitymask.transform.localPosition = pos[config.Bg]
self.likeabilitymask.transform.localPosition = pos[config.Bg].mask
self.icon.transform.localPosition = pos[config.Bg].icon
self.lv.text = lv
if LikabilityManager.CheckIsMaxLv(-1) then
self.likeabilitymask.fillAmount = 1