122 子 【武将】武将系统 / 【武将】武将系统-客户端
16个文件已修改
1个文件已删除
12个文件已添加
| | |
| | | { |
| | | switch (format) |
| | | { |
| | | case ItemCellformat.Format_120x120: |
| | | return 1.2f; |
| | | case ItemCellformat.Format_100x100: |
| | | return 1.1f; |
| | | case ItemCellformat.Format_84x84: |
| | | return 1f; |
| | | case ItemCellformat.Format_80x80: |
| | | return 0.95f; |
| | | case ItemCellformat.Format_70x70: |
| | |
| | | public class OutlineEx : BaseMeshEffect |
| | | { |
| | | [Header("新shader描边")] |
| | | public Color OutlineColor = Color.white; |
| | | public Color OutlineColor = new Color(0, 0, 0, 0.5f);// Color.black; |
| | | |
| | | QualityTextColType m_ColorType = QualityTextColType.None; |
| | | public QualityTextColType colorType |
| | |
| | | } |
| | | |
| | | |
| | | [Range(0, 15)] |
| | | public int OutlineWidth = 0; |
| | | [Range(0, 30)] |
| | | //默认10,不同的颜色(包括调整alpha)视觉上描边粗细有差异,故shader里乘以0.2适应不同情况 |
| | | public int OutlineWidth = 10; |
| | | |
| | | private static List<UIVertex> m_VetexList = new List<UIVertex>(); |
| | | // 材质池:Key为"颜色_宽度"格式的字符串,Value为对应的材质; 减少合批问题,又能保持不同的描边;共用材质会同时改变参数 |
| | |
| | | this._Refresh(); |
| | | } |
| | | |
| | | |
| | | #if UNITY_EDITOR |
| | | //在编辑器下打开也刷新下 |
| | | // protected override void OnEnable() |
| | | // { |
| | | // base.OnEnable(); |
| | | // this._Refresh(); |
| | | // } |
| | | |
| | | protected override void OnValidate() |
| | | { |
| | | base.OnValidate(); |
| | |
| | | m_MaterialPool[key] = material; |
| | | } |
| | | |
| | | if (material == null) |
| | | { |
| | | // 防范材质被删的情况,创建新材质 |
| | | material = new Material(m_Shader); |
| | | m_MaterialPool[key] = material; |
| | | } |
| | | |
| | | material.SetColor("_OutlineColor", this.OutlineColor); |
| | | material.SetInt("_OutlineWidth", this.OutlineWidth); |
| | | |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Wednesday, July 16, 2025
|
| | | // [ Date ]: 2025年7月18日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年7月7日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class HeroSkinConfig : ConfigBase<int, HeroSkinConfig> |
| | | { |
| | | |
| | | public int SkinID; |
| | | public int[] WearAttrIDList; |
| | | public int[] WearAttrValueList; |
| | | public int[] AllBatAttrIDList; |
| | | public int[] AllBatAttrValueList; |
| | | public string Tachie; |
| | | public string SquareIcon; |
| | | public string RectangleIcon; |
| | | public string SpineRes; |
| | | public string BigSizeSpine; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | | int key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out SkinID); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月18日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class HeroSkinConfig : ConfigBase<int, HeroSkinConfig>
|
| | | {
|
| | |
|
| | | public int SkinID;
|
| | | public int[] WearAttrIDList;
|
| | | public int[] WearAttrValueList;
|
| | | public int[] AllBatAttrIDList;
|
| | | public int[] AllBatAttrValueList;
|
| | | public string Tachie;
|
| | | public string SquareIcon;
|
| | | public string RectangleIcon;
|
| | | public string SpineRes;
|
| | |
|
| | | public override int LoadKey(string _key)
|
| | | {
|
| | | int key = GetKey(_key);
|
| | | return key;
|
| | | }
|
| | |
|
| | | public override void LoadConfig(string input)
|
| | | {
|
| | | try {
|
| | | string[] tables = input.Split('\t');
|
| | | int.TryParse(tables[0],out SkinID); |
| | |
|
| | | if (tables[1].Contains("[")) |
| | | { |
| | | WearAttrIDList = JsonMapper.ToObject<int[]>(tables[1]); |
| | |
| | | { |
| | | int.TryParse(WearAttrIDListStringArray[i],out WearAttrIDList[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[2].Contains("[")) |
| | | { |
| | | WearAttrValueList = JsonMapper.ToObject<int[]>(tables[2]); |
| | |
| | | { |
| | | int.TryParse(WearAttrValueListStringArray[i],out WearAttrValueList[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | AllBatAttrIDList = JsonMapper.ToObject<int[]>(tables[3]); |
| | |
| | | { |
| | | int.TryParse(AllBatAttrIDListStringArray[i],out AllBatAttrIDList[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | AllBatAttrValueList = JsonMapper.ToObject<int[]>(tables[4]); |
| | |
| | | { |
| | | int.TryParse(AllBatAttrValueListStringArray[i],out AllBatAttrValueList[i]); |
| | | } |
| | | } |
| | | |
| | | Tachie = tables[5]; |
| | | |
| | | SquareIcon = tables[6]; |
| | | |
| | | RectangleIcon = tables[7]; |
| | | |
| | | SpineRes = tables[8]; |
| | | |
| | | BigSizeSpine = tables[9]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | Tachie = tables[5];
|
| | |
|
| | | SquareIcon = tables[6];
|
| | |
|
| | | RectangleIcon = tables[7];
|
| | |
|
| | | SpineRes = tables[8];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | { |
| | | |
| | | // 觉醒配置 |
| | | public HeroAwakeConfig awakeConfig; |
| | | public HeroAwakeConfig awakeConfig |
| | | { |
| | | get |
| | | { |
| | | return HeroAwakeConfig.GetHeroAwakeConfig(heroId, awakeLevel); |
| | | } |
| | | } |
| | | |
| | | |
| | | // 品质觉醒配置 |
| | | public HeroQualityAwakeConfig qualityAwakeConfig; |
| | | public HeroQualityAwakeConfig qualityAwakeConfig |
| | | { |
| | | get |
| | | { |
| | | return HeroQualityAwakeConfig.GetQualityAwakeConfig(Quality, awakeLevel); |
| | | } |
| | | } |
| | | |
| | | // 武将觉醒等级 |
| | | public int awakeLevel |
| | |
| | | public partial class HeroInfo |
| | | { |
| | | // 突破配置 |
| | | public HeroBreakConfig breakConfig; |
| | | public HeroBreakConfig breakConfig |
| | | { |
| | | get |
| | | { |
| | | return HeroBreakConfig.GetHeroBreakConfig(heroId, breakLevel); |
| | | } |
| | | } |
| | | |
| | | // 品质突破配置 |
| | | public HeroQualityBreakConfig qualityBreakConfig; |
| | | public HeroQualityBreakConfig qualityBreakConfig; |
| | | |
| | | // 武将突破等级 |
| | | public int breakLevel |
| | |
| | | } |
| | | } |
| | | // 服务器数据 皮肤ID |
| | | public int SkinID; |
| | | public int SkinID |
| | | { |
| | | get |
| | | { |
| | | |
| | | return heroConfig.SkinIDList[SkinIndex]; |
| | | } |
| | | } |
| | | |
| | | // 皮肤配置 |
| | | public HeroSkinConfig skinConfig; |
| | | public HeroSkinConfig skinConfig |
| | | { |
| | | get |
| | | { |
| | | return HeroSkinConfig.Get(SkinID); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | public bool isLock |
| | | { |
| | | get |
| | | { |
| | | return itemHero.itemInfo.isLock; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public List<HeroFetterInfo> fetterInfoList = new List<HeroFetterInfo>(); |
| | |
| | | heroId = 520001; // 默认英雄ID |
| | | |
| | | heroConfig = HeroConfig.Get(heroId); |
| | | awakeConfig = HeroAwakeConfig.GetHeroAwakeConfig(heroId, awakeLevel); |
| | | breakConfig = HeroBreakConfig.GetHeroBreakConfig(heroId, breakLevel); |
| | | qualityAwakeConfig = HeroQualityAwakeConfig.GetQualityAwakeConfig(Quality, awakeLevel); |
| | | qualityConfig = HeroQualityConfig.Get(Quality); |
| | | qualityBreakConfig = HeroQualityBreakConfig.GetQualityBreakConfig(Quality, awakeLevel); |
| | | CalculateProperties(); |
| | |
| | | // 武将配置 |
| | | heroConfig = HeroConfig.Get(heroId); |
| | | |
| | | // 觉醒配置 (满级为空) |
| | | awakeConfig = HeroAwakeConfig.GetHeroAwakeConfig(heroId, awakeLevel); |
| | | |
| | | // 突破配置 |
| | | breakConfig = HeroBreakConfig.GetHeroBreakConfig(heroId, breakLevel); |
| | | |
| | | // 羁绊配置 可能需要fetterid 去检索效率太低 |
| | | // fetterConfig; |
| | | |
| | | // 品质觉醒配置 |
| | | qualityAwakeConfig = HeroQualityAwakeConfig.GetQualityAwakeConfig(Quality, awakeLevel); |
| | | |
| | | // 品质配置 |
| | | qualityConfig = HeroQualityConfig.Get(Quality); |
| | |
| | | { |
| | | if (m_LvText == null) |
| | | { |
| | | m_LvText = this.transform.GetComponent<Text>("Container_GiftCell/lv"); |
| | | m_LvText = this.transform.GetComponent<Text>("Container_GiftCell/lvrect/lv"); |
| | | } |
| | | return m_LvText; |
| | | } |
| | |
| | | |
| | | //showState 0:不显示 1:新增 2:提升 |
| | | //giftID 0 :代表未激活灰色 -1:代表不能激活 棕色,其他根据配表 |
| | | private void Init(int giftID, int lv, UnityAction onclick = null, int showState = 0) |
| | | public void Init(int giftID, int lv, UnityAction onclick = null, int showState = 0) |
| | | { |
| | | if (HeroTalentConfig.HasKey(giftID)) |
| | | { |
| | |
| | | if (quality == 1) |
| | | { |
| | | //692088 |
| | | return new Color32(105, 32, 136, 255); |
| | | return new Color32(105, 32, 136, 128); |
| | | } |
| | | else if (quality == 2) |
| | | { |
| | | //886220 |
| | | return new Color32(136, 98, 32, 255); |
| | | return new Color32(136, 98, 32, 128); |
| | | } |
| | | else if (quality == 3) |
| | | { |
| | | //884a20 |
| | | return new Color32(136, 74, 32, 255); |
| | | return new Color32(136, 74, 32, 128); |
| | | } |
| | | else if (quality == 4) |
| | | { |
| | | //882020 |
| | | return new Color32(136, 32, 32, 255); |
| | | return new Color32(136, 32, 32, 128); |
| | | } |
| | | return new Color32(255, 255, 255, 255); |
| | | return new Color32(0, 0, 0, 128); |
| | | } |
| | | |
| | | GameObject cellContainer; |
| | |
| | | if (cellContainer != null) |
| | | return; |
| | | |
| | | var tmp = transform.Find("Container_SkillCell"); |
| | | var tmp = transform.Find("Container_GiftCell"); |
| | | if (tmp != null) |
| | | { |
| | | cellContainer = tmp.gameObject; |
| | |
| | | } |
| | | if (cellContainer == null) |
| | | { |
| | | cellContainer = UIUtility.CreateWidget("SkillBaseCell", "Container_SkillCell"); |
| | | cellContainer = UIUtility.CreateWidget("GiftBaseCell", "Container_GiftCell"); |
| | | |
| | | if (cellContainer != null) |
| | | { |
| | |
| | | cellContainer.transform.SetAsFirstSibling(); |
| | | } |
| | | } |
| | | |
| | | //缩放到和父rect一样大 |
| | | var scale = 1f; |
| | | var rect = cellContainer.GetComponent<RectTransform>(); |
| | | var parentRect = transform.GetComponent<RectTransform>(); |
| | | scale = parentRect.sizeDelta.x / rect.sizeDelta.x; |
| | | cellContainer.transform.localScale = new Vector3(scale, scale, scale); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | trainStateImg.SetActive(false); |
| | | } |
| | | nameText.text = hero.breakLevel == 0 ? heroConfig.Name : Language.Get("herocardbreaklv" + heroConfig.Name + hero.breakLevel); |
| | | nameText.text = hero.breakLevel == 0 ? heroConfig.Name : Language.Get("herocardbreaklv", heroConfig.Name, hero.breakLevel); |
| | | awakeImg.SetActive(hero.awakeLevel > 0); |
| | | awakeLVText.text = hero.awakeLevel.ToString(); |
| | | |
New file |
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using UnityEngine.Events; |
| | | using System.Collections.Generic; |
| | | |
| | | public class HeroHeadBaseCell : MonoBehaviour |
| | | { |
| | | |
| | | Button m_ClickBtn; |
| | | Button clickBtn |
| | | { |
| | | get |
| | | { |
| | | if (m_ClickBtn == null) |
| | | { |
| | | m_ClickBtn = this.transform.GetComponent<Button>("Container_HeadCell"); |
| | | } |
| | | return m_ClickBtn; |
| | | } |
| | | } |
| | | |
| | | Image m_QualityBG; |
| | | Image qualityBG |
| | | { |
| | | get |
| | | { |
| | | if (m_QualityBG == null) |
| | | { |
| | | m_QualityBG = this.transform.GetComponent<Image>("Container_HeadCell/qualityIcon"); |
| | | } |
| | | return m_QualityBG; |
| | | } |
| | | } |
| | | |
| | | Image m_HeroIcon; |
| | | Image heroIcon |
| | | { |
| | | get |
| | | { |
| | | if (m_HeroIcon == null) |
| | | { |
| | | m_HeroIcon = this.transform.GetComponent<Image>("Container_HeadCell/heroIcon"); |
| | | } |
| | | return m_HeroIcon; |
| | | } |
| | | } |
| | | |
| | | Transform m_StarRect; |
| | | Transform starRect |
| | | { |
| | | get |
| | | { |
| | | if (m_StarRect == null) |
| | | { |
| | | m_StarRect = this.transform.Find("Container_HeadCell/stars"); |
| | | } |
| | | return m_StarRect; |
| | | } |
| | | } |
| | | |
| | | List<Image> m_StarsImg; |
| | | List<Image> starsImg |
| | | { |
| | | get |
| | | { |
| | | if (m_StarsImg == null) |
| | | { |
| | | m_StarsImg = new List<Image>(); |
| | | for (int i = 0; i < 5; i++) |
| | | { |
| | | var star = this.transform.GetComponent<Image>("Container_HeadCell/stars/star" + i); |
| | | m_StarsImg.Add(star); |
| | | } |
| | | } |
| | | return m_StarsImg; |
| | | } |
| | | } |
| | | |
| | | |
| | | Image m_CountryImg; |
| | | Image countryImg |
| | | { |
| | | get |
| | | { |
| | | if (m_CountryImg == null) |
| | | { |
| | | m_CountryImg = this.transform.GetComponent<Image>("Container_HeadCell/country"); |
| | | } |
| | | return m_CountryImg; |
| | | } |
| | | } |
| | | |
| | | Transform m_AwakeLvRect; |
| | | Transform awakeLvRect |
| | | { |
| | | get |
| | | { |
| | | if (m_AwakeLvRect == null) |
| | | { |
| | | m_AwakeLvRect = this.transform.Find("Container_HeadCell/awakelv"); |
| | | } |
| | | return m_AwakeLvRect; |
| | | } |
| | | } |
| | | |
| | | Text m_AwakeLvText; |
| | | Text awakeLvText |
| | | { |
| | | get |
| | | { |
| | | if (m_AwakeLvText == null) |
| | | { |
| | | m_AwakeLvText = this.transform.GetComponent<Text>("Container_HeadCell/awakelv/lv"); |
| | | } |
| | | return m_AwakeLvText; |
| | | } |
| | | } |
| | | |
| | | |
| | | Text m_LvText; |
| | | Text lvText |
| | | { |
| | | get |
| | | { |
| | | if (m_LvText == null) |
| | | { |
| | | m_LvText = this.transform.GetComponent<Text>("Container_HeadCell/lv"); |
| | | } |
| | | return m_LvText; |
| | | } |
| | | } |
| | | |
| | | |
| | | void Awake() |
| | | { |
| | | LoadPrefab(); |
| | | } |
| | | |
| | | // 武将小头像,(职业和名称不再此管理,各个界面排版不同) |
| | | public void Init(int heroID, int skinID = 0, int star = 0, int awakelv = 0, int lv = 0, UnityAction onclick = null) |
| | | { |
| | | clickBtn.AddListener(onclick); |
| | | var heroConfig = HeroConfig.Get(heroID); |
| | | qualityBG.SetSprite("heroheadBG" + heroConfig.Quality); |
| | | // int skinID = 0; |
| | | // if (heroGuid != "") |
| | | // { |
| | | // skinID = HeroManager.Instance.GetHero(heroGuid).SkinID; |
| | | // } |
| | | // else |
| | | // { |
| | | // skinID = heroConfig.SkinIDList[0]; |
| | | // } |
| | | var sprite = UILoader.LoadSprite("HeroHead", HeroSkinConfig.Get(skinID).SquareIcon); |
| | | if (sprite == null) |
| | | { |
| | | heroIcon.SetSprite("herohead_default"); |
| | | } |
| | | else |
| | | { |
| | | heroIcon.overrideSprite = sprite; |
| | | } |
| | | for (int i = 0; i < 5; i++) |
| | | { |
| | | if (i < star) |
| | | { |
| | | starsImg[i].SetSprite("star"); |
| | | } |
| | | else |
| | | { |
| | | starsImg[i].SetSprite("star0"); |
| | | } |
| | | } |
| | | |
| | | if (star == 0) |
| | | { |
| | | starRect.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | starRect.SetActive(true); |
| | | for (int i = 0; i < starsImg.Count; i++) |
| | | { |
| | | if ((star - 1) % starsImg.Count >= i) |
| | | { |
| | | starsImg[i].SetActive(true); |
| | | starsImg[i].SetSprite("herostar" + (((star - 1) / starsImg.Count) + 1) * starsImg.Count); |
| | | } |
| | | else |
| | | { |
| | | starsImg[i].SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | countryImg.SetSprite("herocountry" + heroConfig.Country); |
| | | lvText.text = lv.ToString(); |
| | | |
| | | awakeLvRect.SetActive(awakelv > 0); |
| | | awakeLvText.text = awakelv.ToString(); |
| | | |
| | | |
| | | } |
| | | |
| | | GameObject cellContainer; |
| | | protected void LoadPrefab() |
| | | { |
| | | if (cellContainer != null) |
| | | return; |
| | | |
| | | var tmp = transform.Find("Container_HeadCell"); |
| | | if (tmp != null) |
| | | { |
| | | cellContainer = tmp.gameObject; |
| | | return; |
| | | } |
| | | if (cellContainer == null) |
| | | { |
| | | cellContainer = UIUtility.CreateWidget("HeroHeadBaseCell", "Container_HeadCell"); |
| | | |
| | | if (cellContainer != null) |
| | | { |
| | | cellContainer.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | cellContainer.transform.SetAsFirstSibling(); |
| | | } |
| | | } |
| | | |
| | | //缩放到和父rect一样大 |
| | | var scale = 1f; |
| | | var rect = cellContainer.GetComponent<RectTransform>(); |
| | | var parentRect = transform.GetComponent<RectTransform>(); |
| | | scale = parentRect.sizeDelta.x / rect.sizeDelta.x; |
| | | cellContainer.transform.localScale = new Vector3(scale, scale, scale); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5a35d2e277b297c43b183c7cfda88504 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using System.Collections.Generic; |
| | | |
| | | public class HeroShowBaseCell : MonoBehaviour |
| | | { |
| | | |
| | | Image m_QualityBG; |
| | | Image qualityBG |
| | | { |
| | | get |
| | | { |
| | | if (m_QualityBG == null) |
| | | { |
| | | m_QualityBG = this.transform.GetComponent<Image>("Container_HeroShow/dz"); |
| | | } |
| | | return m_QualityBG; |
| | | } |
| | | } |
| | | |
| | | UIHeroController m_HeroModel; |
| | | UIHeroController heroModel |
| | | { |
| | | get |
| | | { |
| | | if (m_HeroModel == null) |
| | | { |
| | | m_HeroModel = this.transform.GetComponent<UIHeroController>("Container_HeroShow/rolemodel"); |
| | | } |
| | | return m_HeroModel; |
| | | } |
| | | } |
| | | |
| | | Transform m_StarRect; |
| | | Transform starRect |
| | | { |
| | | get |
| | | { |
| | | if (m_StarRect == null) |
| | | { |
| | | m_StarRect = this.transform.Find("Container_HeroShow/stars"); |
| | | } |
| | | return m_StarRect; |
| | | } |
| | | } |
| | | |
| | | List<Image> m_StarsImg; |
| | | List<Image> starsImg |
| | | { |
| | | get |
| | | { |
| | | if (m_StarsImg == null) |
| | | { |
| | | m_StarsImg = new List<Image>(); |
| | | for (int i = 0; i < 5; i++) |
| | | { |
| | | var star = this.transform.GetComponent<Image>("Container_HeroShow/stars/star" + i); |
| | | m_StarsImg.Add(star); |
| | | } |
| | | } |
| | | return m_StarsImg; |
| | | } |
| | | } |
| | | |
| | | |
| | | Image m_LockState; |
| | | Image lockState |
| | | { |
| | | get |
| | | { |
| | | if (m_LockState == null) |
| | | { |
| | | m_LockState = this.transform.GetComponent<Image>("Container_HeroShow/lockstate"); |
| | | } |
| | | return m_LockState; |
| | | } |
| | | } |
| | | |
| | | Text m_Name; |
| | | Text nameText |
| | | { |
| | | get |
| | | { |
| | | if (m_Name == null) |
| | | { |
| | | m_Name = this.transform.GetComponent<Text>("Container_HeroShow/name"); |
| | | } |
| | | return m_Name; |
| | | } |
| | | } |
| | | |
| | | |
| | | Text m_LvText; //武将等级 + 觉醒等级 |
| | | Text lvText |
| | | { |
| | | get |
| | | { |
| | | if (m_LvText == null) |
| | | { |
| | | m_LvText = this.transform.GetComponent<Text>("Container_HeroShow/lv"); |
| | | } |
| | | return m_LvText; |
| | | } |
| | | } |
| | | |
| | | |
| | | OutlineEx heroNameOutline; |
| | | OutlineEx heroLVOutline; |
| | | void Awake() |
| | | { |
| | | LoadPrefab(); |
| | | } |
| | | |
| | | // 武将小头像,(职业和名称不再此管理,各个界面排版不同) |
| | | public void Init(int heroID, int skinID = 0, int breakLevel = 0, int star = 0, int awakelv = 0, int lv = 0, bool isShowLock = false) |
| | | { |
| | | var heroConfig = HeroConfig.Get(heroID); |
| | | qualityBG.SetSprite("herodz" + heroConfig.Quality); |
| | | // int skinID = 0; |
| | | // if (heroGuid != "") |
| | | // { |
| | | // var hero = HeroManager.Instance.GetHero(heroGuid); |
| | | // skinID = hero.SkinID; |
| | | // } |
| | | // else |
| | | // { |
| | | // skinID = heroConfig.SkinIDList[0]; |
| | | // } |
| | | |
| | | heroModel.Create(skinID, heroConfig.UIScale); |
| | | |
| | | if (star == 0) |
| | | { |
| | | starRect.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | starRect.SetActive(true); |
| | | for (int i = 0; i < starsImg.Count; i++) |
| | | { |
| | | if ((star - 1) % starsImg.Count >= i) |
| | | { |
| | | starsImg[i].SetActive(true); |
| | | starsImg[i].SetSprite("herostar" + (((star - 1) / starsImg.Count) + 1) * starsImg.Count); |
| | | } |
| | | else |
| | | { |
| | | starsImg[i].SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | lockState.SetActive(isShowLock); |
| | | |
| | | nameText.text = breakLevel == 0 ? heroConfig.Name : Language.Get("herocardbreaklv", heroConfig.Name, breakLevel); |
| | | nameText.color = UIHelper.GetUIColorByFunc(heroConfig.Quality); |
| | | heroNameOutline.colorType = (QualityTextColType)heroConfig.Quality; |
| | | lvText.text = string.Format("{0}{1} {2}", Language.Get("L1094"), lv, awakelv == 0 ? Language.Get("herocard13") : Language.Get("herocard12", awakelv)); |
| | | heroLVOutline.colorType = awakelv == 0 ? QualityTextColType.None : QualityTextColType.red; |
| | | |
| | | } |
| | | |
| | | GameObject cellContainer; |
| | | protected void LoadPrefab() |
| | | { |
| | | if (cellContainer != null) |
| | | return; |
| | | |
| | | var tmp = transform.Find("Container_HeroShow"); |
| | | if (tmp != null) |
| | | { |
| | | cellContainer = tmp.gameObject; |
| | | return; |
| | | } |
| | | if (cellContainer == null) |
| | | { |
| | | cellContainer = UIUtility.CreateWidget("HeroShowBaseCell", "Container_HeroShow"); |
| | | |
| | | if (cellContainer != null) |
| | | { |
| | | cellContainer.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | cellContainer.transform.SetAsFirstSibling(); |
| | | } |
| | | } |
| | | |
| | | //缩放到和父rect一样大 |
| | | var scale = 1f; |
| | | var rect = cellContainer.GetComponent<RectTransform>(); |
| | | var parentRect = transform.GetComponent<RectTransform>(); |
| | | scale = parentRect.sizeDelta.x / rect.sizeDelta.x; |
| | | cellContainer.transform.localScale = new Vector3(scale, scale, scale); |
| | | heroNameOutline = nameText.GetComponent<OutlineEx>(); |
| | | heroLVOutline = lvText.GetComponent<OutlineEx>(); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3fda1dd0f72aa5e4e9902eb5ae19368c |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | |
|
| | | public string guid; //物品的实例ID
|
| | | public int gearScore; //评分
|
| | | public bool isLock; //是否锁定
|
| | |
|
| | | public ItemInfo()
|
| | | {
|
| | |
| | | guid = serverItem.ItemGUID;
|
| | | isAuction = serverItem.IsBind;
|
| | | gearScore = (int)serverItem.GearScore;
|
| | | isLock = serverItem.IsLocked > 0;
|
| | | }
|
| | |
|
| | | public ItemInfo(H0704_tagRolePackRefresh serverItem)
|
| | |
| | | guid = serverItem.ItemGUID;
|
| | | isAuction = serverItem.IsBind;
|
| | | gearScore = (int)serverItem.GearScore;
|
| | | isLock = serverItem.IsLocked > 0;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | public enum ItemCellformat
|
| | | {
|
| | | Format_120x120,
|
| | | Format_100x100,
|
| | | Format_84x84,
|
| | | Format_80x80,
|
| | |
| | | cellContainer = UIUtility.CreateWidget("ItemCell_84", "Container_ItemCell");
|
| | | break;
|
| | | case ItemCellformat.Format_100x100:
|
| | | cellContainer = UIUtility.CreateWidget("ItemCell_100", "Container_ItemCell");
|
| | | break;
|
| | | cellContainer = UIUtility.CreateWidget("ItemCell_100", "Container_ItemCell");
|
| | | break;
|
| | | case ItemCellformat.Format_120x120:
|
| | | cellContainer = UIUtility.CreateWidget("ItemCell_120", "Container_ItemCell");
|
| | | break;
|
| | | }
|
| | |
|
| | | if (cellContainer != null)
|
| | |
| | | {
|
| | | //代金券
|
| | | countText.SetActive(true);
|
| | | countText.text = count > 1000000 ? UIHelper.ReplaceLargeNum(count / 100.0f) : (count / 100.0f).ToString("0.##");
|
| | | countText.text = count > 1000000 ? UIHelper.ReplaceLargeNum(count / 100.0f) : (count / 100.0f).ToString("0.#");
|
| | | }
|
| | | else if (Array.IndexOf(packModel.textCountShow2, itemId) != -1)
|
| | | {
|
| | |
| | | { |
| | | if (cellContainer != null) |
| | | return; |
| | | |
| | | |
| | | var tmp = transform.Find("Container_SkillCell"); |
| | | if (tmp != null) |
| | | { |
| | |
| | | cellContainer.transform.SetAsFirstSibling(); |
| | | } |
| | | } |
| | | |
| | | //缩放到和父rect一样大 |
| | | var scale = 1f; |
| | | var rect = cellContainer.GetComponent<RectTransform>(); |
| | | var parentRect = transform.GetComponent<RectTransform>(); |
| | | scale = parentRect.sizeDelta.x / rect.sizeDelta.x; |
| | | cellContainer.transform.localScale = new Vector3(scale, scale, scale); |
| | | } |
| | | } |
| | | |
| | |
| | | // } |
| | | // } |
| | | |
| | | // public static string generalItemTip; |
| | | // public static int generalItemId; |
| | | // public static int generalItemCnt; |
| | | // public static Action ItemConfirmEvent; |
| | | // public static void ShowItemConfirm(string info, int _itemId, int _itemCnt, Action func) |
| | | // { |
| | | // generalItemTip = info; |
| | | // generalItemId = _itemId; |
| | | // generalItemCnt = _itemCnt; |
| | | // ItemConfirmEvent = func; |
| | | // if (!UIManager.Instance.IsOpened<ItemConfirmWin>()) |
| | | // { |
| | | // UIManager.Instance.OpenWindow<ItemConfirmWin>(); |
| | | // } |
| | | // } |
| | | public static string generalItemTip; |
| | | public static string generalItemTip2; |
| | | public static Action ItemConfirmEvent; |
| | | |
| | | // public static List<Item> getItems { get; private set; } |
| | | // //多物品确认框 |
| | | // public static void ShowItemsConfirm(List<Item> items, string tiltle, string info, string btnText, Action func, int moneyCnt = 0, int type = 0) |
| | | // { |
| | | // getItems = items; |
| | | // generalTitle = tiltle; |
| | | // generalItemTip = info; |
| | | // ItemConfirmEvent = func; |
| | | // OKName = btnText; |
| | | // ItemConfirmEvent = func; |
| | | // moneyType = type; |
| | | // moneyNeedCount = moneyCnt; |
| | | // if (!UIManager.Instance.IsOpened<ItemsConfirmWin>()) |
| | | // { |
| | | // UIManager.Instance.OpenWindow<ItemsConfirmWin>(); |
| | | // } |
| | | // } |
| | | public static List<Item> getItems { get; private set; } |
| | | //多物品确认框 |
| | | public static void ShowItemsConfirm(List<Item> items, string tiltle, string info, string info2, string btnText, Action func, int moneyCnt = 0, int type = 0) |
| | | { |
| | | getItems = items; |
| | | generalTitle = tiltle; |
| | | generalItemTip = info; |
| | | generalItemTip2 = info2; |
| | | ItemConfirmEvent = func; |
| | | OKName = btnText; |
| | | ItemConfirmEvent = func; |
| | | moneyType = type; |
| | | moneyNeedCount = moneyCnt; |
| | | if (!UIManager.Instance.IsOpened<ItemsConfirmWin>()) |
| | | { |
| | | UIManager.Instance.OpenWindow<ItemsConfirmWin>(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | // public static string moneyTitle; |
| | | // public static string moneyTopInfo; |
| | | // public static string moneybtnOkText; |
| | | // public static int moneyType; |
| | | // public static int moneyNeedCount; |
| | | // public static ulong moneyHaveCount; |
| | | // public static string moneyToggleText { get; private set; } |
| | | // public static bool moneytoggleOpen { get; private set; } |
| | | // public static bool moneytoggleOpenState { get; private set; } |
| | | public static string moneyTitle; |
| | | public static string moneyTopInfo; |
| | | public static string moneybtnOkText; |
| | | public static int moneyType; |
| | | public static int moneyNeedCount; |
| | | public static ulong moneyHaveCount; |
| | | public static string moneyToggleText { get; private set; } |
| | | public static bool moneytoggleOpen { get; private set; } |
| | | public static bool moneytoggleOpenState { get; private set; } |
| | | |
| | | // public static Action<bool, bool> OnMoneyToggleConfirmAct; |
| | | // public static void MoneyIconToggleConfirm(string title, string topInfo,string okTxt, int type, |
New file |
| | |
| | | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | public class FuncRuleWin : UIBase |
| | | { |
| | | [SerializeField] Text m_Title; |
| | | [SerializeField] Text m_RuleTxt; |
| | | [SerializeField] RectTransform scrollRect; |
| | | [SerializeField] float maxHeight = 800f; // 设置最大高度限制 |
| | | |
| | | |
| | | #region Built-in |
| | | |
| | | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | var config = RuleConfig.Get(functionOrder); |
| | | |
| | | m_RuleTxt.text = Language.Get(config.Description); |
| | | m_Title.text = Language.Get(config.Title); |
| | | |
| | | } |
| | | |
| | | //打开后固定文本,不会动态变化 |
| | | protected override void NextFrameAfterOpen() |
| | | { |
| | | Vector2 newSizeDelta = scrollRect.sizeDelta; |
| | | newSizeDelta.y = Mathf.Min(newSizeDelta.y, maxHeight); // 限制最大高度 |
| | | scrollRect.sizeDelta = newSizeDelta; |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | } |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9ea6dcfb0da70ee4bb61fc19986f8ccb |
| | | timeCreated: 1514008173 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | public class FuncRules : MonoBehaviour |
| | | { |
| | | [SerializeField] Button m_Button; |
| | | [SerializeField] int m_RuleId; |
| | | |
| | | |
| | | private void Awake() |
| | | { |
| | | m_Button.AddListener(OpenRuleWin); |
| | | } |
| | | |
| | | private void OpenRuleWin() |
| | | { |
| | | var rule = RuleConfig.Get(m_RuleId); |
| | | if (!UIManager.Instance.IsOpened<FuncRuleWin>()) |
| | | { |
| | | UIManager.Instance.OpenWindow<FuncRuleWin>(m_RuleId); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ef9fe2c109ccba344bf7c63d50f3d784 |
| | | timeCreated: 1514008377 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | using System;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | public class ItemsConfirmCell : CellView
|
| | | {
|
| | | [SerializeField] ItemCell itemCell;
|
| | | [SerializeField] Text itemName;
|
| | |
|
| | | public void Display(int index)
|
| | | {
|
| | | int itemID = ConfirmCancel.getItems[index].id;
|
| | | itemCell.Init(new ItemCellModel(itemID, false, (ulong)ConfirmCancel.getItems[index].count));
|
| | | itemCell.button.SetListener(() =>
|
| | | {
|
| | | ItemTipUtility.Show(itemID);
|
| | | });
|
| | | itemName.text = ItemConfig.Get(itemID).ItemName;
|
| | | }
|
| | | }
|
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5e8436e8c402b7e4ab174de4ebbabc02 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | //带有多个物品的操作提示
|
| | | public class ItemsConfirmWin : UIBase
|
| | | {
|
| | | [SerializeField] Text m_Title;
|
| | | [SerializeField] Text m_Info; //上方提示
|
| | | [SerializeField] Text m_Info2; //物品列表下方提示
|
| | | [SerializeField] ScrollerController m_Scroller;
|
| | | [SerializeField] Button m_ConfirmBtn;
|
| | | [SerializeField] Text m_BtnText;
|
| | | [SerializeField] Transform moneyObj;
|
| | | [SerializeField] Text moneyText;
|
| | | [SerializeField] Image moneyIcon;
|
| | |
|
| | |
|
| | | #region Built-in
|
| | |
|
| | |
|
| | | protected override void InitComponent()
|
| | | {
|
| | | m_ConfirmBtn.AddListener(ConfirmBtn);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | m_Title.text = ConfirmCancel.generalTitle;
|
| | | m_Info.text = ConfirmCancel.generalItemTip;
|
| | | if (string.IsNullOrEmpty(ConfirmCancel.generalItemTip2))
|
| | | { |
| | | m_Info2.SetActive(false);
|
| | | }
|
| | | else
|
| | | { |
| | | m_Info2.SetActive(true);
|
| | | m_Info2.text = ConfirmCancel.generalItemTip2;
|
| | | }
|
| | | m_Scroller.OnRefreshCell += OnRefreshCell;
|
| | | CreateScroller();
|
| | | m_BtnText.text = ConfirmCancel.OKName;
|
| | | if (ConfirmCancel.moneyNeedCount == 0)
|
| | | {
|
| | | moneyObj.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | moneyObj.SetActive(true);
|
| | | moneyText.text = UIHelper.AppendColor((ulong)ConfirmCancel.moneyNeedCount > UIHelper.GetMoneyCnt(ConfirmCancel.moneyType) ? TextColType.Red:TextColType.Green,
|
| | | string.Format("{0}/{1}", UIHelper.GetMoneyCnt(ConfirmCancel.moneyType), ConfirmCancel.moneyNeedCount));
|
| | |
|
| | | moneyIcon.SetIconWithMoneyType(ConfirmCancel.moneyType);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | m_Scroller.OnRefreshCell -= OnRefreshCell;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | private void ConfirmBtn()
|
| | | {
|
| | | if (ConfirmCancel.ItemConfirmEvent != null)
|
| | | {
|
| | | ConfirmCancel.ItemConfirmEvent();
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | void OnRefreshCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | var _cell = cell as ItemsConfirmCell;
|
| | | _cell?.Display(cell.index);
|
| | | }
|
| | |
|
| | | void CreateScroller()
|
| | | {
|
| | | m_Scroller.Refresh();
|
| | | for (int i = 0; i < ConfirmCancel.getItems.Count; i++)
|
| | | {
|
| | | m_Scroller.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | m_Scroller.Restart();
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e503b901a97e01446b04bf27693afb1e |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | itemyuanzu = 10, //元祖 |
| | | itembuxiu = 11, //不朽 |
| | | itemyonghen = 12, //永恒 |
| | | |
| | | red = 13, //红色 |
| | | } |
| | | |
| | | public enum TextColType |
| | |
| | | using System.Text; |
| | | using UnityEngine; |
| | | using System.Linq; |
| | | using System.Xml.Linq; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine.UI; |
| | | |
| | |
| | | } |
| | | else if (num >= M) |
| | | { |
| | | return StringUtility.Contact(numto2Decimals(num / M).ToString("0.##"), Language.Get("L1070")); |
| | | return StringUtility.Contact(numto2Decimals(num / M).ToString("0.#"), Language.Get("L1070")); |
| | | } |
| | | else if (num >= K) |
| | | { |
| | | return StringUtility.Contact(numto2Decimals(num / K).ToString("0.##"), Language.Get("L1071")); |
| | | return StringUtility.Contact(numto2Decimals(num / K).ToString("0.#"), Language.Get("L1071")); |
| | | } |
| | | else |
| | | { |
| | | return numto2Decimals(num).ToString("0.##"); |
| | | return numto2Decimals(num).ToString("0.#"); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | else if (num >= M) |
| | | { |
| | | return StringUtility.Contact(numto2Decimals(num / M).ToString("0.##"),"m"); |
| | | return StringUtility.Contact(numto2Decimals(num / M).ToString("0.#"), "m"); |
| | | } |
| | | else if (num >= K) |
| | | { |
| | | return StringUtility.Contact(numto2Decimals(num / K).ToString("0.##"), "k"); |
| | | return StringUtility.Contact(numto2Decimals(num / K).ToString("0.#"), "k"); |
| | | } |
| | | else |
| | | { |
| | | return numto2Decimals(num).ToString("0.##"); |
| | | return numto2Decimals(num).ToString("0.#"); |
| | | } |
| | | } |
| | | |
| | |
| | | // return name; |
| | | // } |
| | | |
| | | //物品 各功能品质 |
| | | public static Color GetUIColorByFunc(int itemColor, bool bright = false) |
| | | { |
| | | return GetUIColor(itemColor + 1, bright); |
| | | } |
| | | |
| | | |
| | | //对应品质(树);物品 各功能品质从2开始 用GetUIColorByFunc |
| | | public static Color GetUIColor(int itemColor, bool bright = false) |
| | | { |
| | | switch (itemColor) |
| | |
| | | case 11: |
| | | return GetUIColor(TextColType.itembuxiu, bright); |
| | | case 12: |
| | | return GetUIColor(TextColType.itemyonghen, bright); |
| | | return GetUIColor(TextColType.itemyonghen, bright); |
| | | |
| | | |
| | | } |
| | |
| | | return bright ? s_BrightWhiteColor : s_DarkWhiteColor; |
| | | } |
| | | |
| | | //对应品质(树);物品 各功能品质从2开始 用GetUIOutlineColorByFunc |
| | | public static Color GetUIOutlineColor(int quality) |
| | | { |
| | | return GetUIOutlineColor((QualityTextColType)quality); |
| | | } |
| | | |
| | | //描边颜色,对应品质 |
| | | //物品 各功能品质 |
| | | public static Color GetUIOutlineColorByFunc(int quality) |
| | | { |
| | | return GetUIOutlineColor((QualityTextColType)(quality + 1)); |
| | | } |
| | | |
| | | //描边颜色,对应品质(树) |
| | | public static Color GetUIOutlineColor(QualityTextColType type) |
| | | { |
| | | switch (type) |
| | | { |
| | | case QualityTextColType.itemcucao: |
| | | // 2d2d2d 粗糙 |
| | | return new Color32(45, 45, 45, 255); |
| | | return new Color32(45, 45, 45, 128); |
| | | case QualityTextColType.itemputong: |
| | | // 424242 普通 |
| | | return new Color32(66, 66, 66, 255); |
| | | return new Color32(66, 66, 66, 128); |
| | | case QualityTextColType.itemjingliang: |
| | | // 172543 精良 |
| | | return new Color32(23, 37, 67, 255); |
| | | return new Color32(23, 37, 67, 128); |
| | | case QualityTextColType.itemxiyou: |
| | | // 2a0f30 稀有 |
| | | return new Color32(42, 15, 48, 255); |
| | | return new Color32(42, 15, 48, 128); |
| | | case QualityTextColType.itemshishi: |
| | | // 4a2f00 史诗 |
| | | return new Color32(74, 47, 0, 255); |
| | | return new Color32(74, 47, 0, 128); |
| | | case QualityTextColType.itemchuanqi: |
| | | // 451800 传奇 |
| | | return new Color32(69, 24, 0, 255); |
| | | return new Color32(69, 24, 0, 128); |
| | | case QualityTextColType.itemshenhua: |
| | | // 510000 神话 |
| | | return new Color32(81, 0, 0, 255); |
| | | return new Color32(81, 0, 0, 128); |
| | | case QualityTextColType.itemwuxia: |
| | | // 43003e 无瑕 |
| | | return new Color32(67, 0, 62, 255); |
| | | return new Color32(67, 0, 62, 128); |
| | | case QualityTextColType.itemanjin: |
| | | // 6f4401 暗金 |
| | | return new Color32(111, 68, 1, 255); |
| | | return new Color32(111, 68, 1, 128); |
| | | case QualityTextColType.itemjueyi: |
| | | // 203995 绝艺 |
| | | return new Color32(32, 57, 149, 255); |
| | | return new Color32(32, 57, 149, 128); |
| | | case QualityTextColType.itemyuanzu: |
| | | // 461f5d 元祖 |
| | | return new Color32(70, 31, 93, 255); |
| | | return new Color32(70, 31, 93, 128); |
| | | case QualityTextColType.itembuxiu: |
| | | // 2e3975 不朽 |
| | | return new Color32(46, 57, 117, 255); |
| | | return new Color32(46, 57, 117, 128); |
| | | case QualityTextColType.itemyonghen: |
| | | // 5d1d52 永恒 |
| | | return new Color32(93, 29, 82, 255); |
| | | return new Color32(93, 29, 82, 128); |
| | | case QualityTextColType.red: |
| | | return s_BrightRedColor; |
| | | } |
| | | return new Color32(0, 0, 0, 255); |
| | | return new Color32(0, 0, 0, 128); |
| | | } |
| | | |
| | | private static Regex m_TextColorRegex = new Regex("<color=#[0-9a-zA-Z]+>(.*)</color>", RegexOptions.Singleline); |