少年修仙传客户端代码仓库
client_Wu Xijin
2018-09-10 34c01f30d2e26aa76a0ee0a5a06664a25ef3fe5a
System/Treasure/TreasurePotentialBriefInfo.cs
@@ -19,6 +19,7 @@
        [SerializeField] Button m_Button;
        [SerializeField] UIEffect m_PotentialSfx;
        [SerializeField] Image m_Select;
        [SerializeField] Image m_Icon;
        //[SerializeField] ScaleTween m_SelectScale;
        public TreasurePotential potential { get; private set; }
@@ -63,7 +64,8 @@
            }
            m_Level.text = _unlock ? StringUtility.Contact(_potential.level, "/", maxLevel) : string.Empty;
            m_Level.transform.localScale = Vector3.one;
            m_PotentialName.text = config.SkillName;// _unlock ? config.SkillName : string.Empty;
            DisplayName(_unlock, config);
            model.potentialLevelChangeEvent -= OnPotentialLevelUp;
            model.potentialLevelChangeEvent += OnPotentialLevelUp;
@@ -97,19 +99,30 @@
            bool _unlock = potential != null && model.IsPotentialUnlock(model.selectedTreasure, potential.id);
            m_Level.text = _unlock ? StringUtility.Contact(potential.level, "/", maxLevel) : string.Empty;
            m_Level.transform.localScale = Vector3.one;
            m_PotentialName.text = config.SkillName;// _unlock ? config.SkillName : string.Empty;
            DisplayName(_unlock, config);
        }
        void DisplayName(bool unlock, SkillConfig config)
        {
            m_PotentialName.text = config.SkillName;
            m_PotentialName.color = UIHelper.GetUIColor(TextColType.LightYellow);
            if (!unlock)
            {
                var requirement = string.Empty;
                if (config.LearnSkillReq > 0 && config.LearnSkillLV > 0)
                {
                    var preskillConfig = Config.Instance.Get<SkillConfig>(config.LearnSkillReq);
                    requirement = Language.Get("Hallows_NeedSkillLVStart", preskillConfig.SkillName, config.LearnSkillLV);
                    m_PotentialName.text = requirement;
                    m_PotentialName.color = UIHelper.GetUIColor(TextColType.Red);
                }
            }
        }
        public void OnPotentialSelected(int _potentialId)
        {
            //m_SelectScale.SetEndState();
            m_Select.gameObject.SetActive(_potentialId == potential.id);
        }
        //public void DisplaySelectSfxScale()
        //{
        //    m_SelectScale.Play();
        //}
        private void OnPotentialLevelUp(int _treasureId, int _potential)
        {
@@ -128,10 +141,12 @@
            m_PotentialSfx.loop = true;
            m_DeadPotentailTween.enabled = false;
            m_DeadPotentailTween.SetStartState();
            m_Icon.material = MaterialUtility.GetUIDefaultGraphicMaterial();
            switch (_state)
            {
                case 0:
                    m_DeadPotentailTween.enabled = true;
                    m_Icon.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
                    break;
                case 1:
                    m_PotentialSfx.effect = 5128;