From 24759a03616da66b7a9f826864e1d4c4072e3ede Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期一, 11 八月 2025 15:10:38 +0800 Subject: [PATCH] 117 【武将】武将系统 - 培养 --- Main/System/HeroUI/GiftBaseCell.cs | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Main/System/HeroUI/GiftBaseCell.cs b/Main/System/HeroUI/GiftBaseCell.cs index afd9460..5ab0faf 100644 --- a/Main/System/HeroUI/GiftBaseCell.cs +++ b/Main/System/HeroUI/GiftBaseCell.cs @@ -45,6 +45,19 @@ } } + OutlineEx m_TextOutline; + OutlineEx textOutline + { + get + { + if (m_TextOutline == null) + { + m_TextOutline = this.transform.GetComponent<OutlineEx>("Container_GiftCell/name"); + } + return m_TextOutline; + } + } + Transform m_LvRect; Transform lvRect { @@ -84,6 +97,8 @@ } } + + void Awake() { LoadPrefab(); @@ -99,10 +114,9 @@ qualityBG.SetSprite("GiftQualityBG" + config.Quality); giftBtn.AddListener(onclick); giftName.text = config.Name; + giftName.color = GetColor(config.Quality); + textOutline.OutlineColor = GetOutlineColor(config.Quality); lvText.text = lv.ToString(); - lvText.color = GetColor(1); - Outline textOutline = lvText.GetComponent<Outline>(); - textOutline.effectColor = GetOutlineColor(config.Quality); lvRect.SetActive(lv > 0); stateImg.SetActive(showState > 0); stateImg.SetSprite("GiftState" + showState); -- Gitblit v1.8.0