Пример #1
0
        public void Fill(Hotfix_LT.Data.SkillTemplate awaken, Hotfix_LT.Data.SkillTemplate pre, LTPartnerData data)
        {
            mDMono.transform.GetComponent <UIPanel>().sortingOrder = mDMono.transform.parent.parent.GetComponent <UIPanel>().sortingOrder + 1;
            mDMono.transform.GetComponent <UIPanel>().depth        = mDMono.transform.parent.parent.GetComponent <UIPanel>().depth + 150;
            awakenSkill = awaken;
            preSkill    = pre;
            if (data.HeroStat.active_skill == preSkill.ID)
            {
                skilllevel = data.ActiveSkillLevel;
            }
            else if (data.HeroStat.passive_skill == preSkill.ID)
            {
                skilllevel = data.PassiveSkillLevel;
            }
            else if (data.HeroStat.common_skill == preSkill.ID)
            {
                skilllevel = data.CommonSkillLevel;
            }
            SetSkillType(awaken.Type);
            SkillIcon.spriteName = awaken.Icon;
            SkillLevel.text      = skilllevel.ToString();
            SkillName.text       = awaken.Name;
            SetSkillTargetLabel(awaken.SelectTargetType);
            preSkilllabel.text    = preSkilllabel.transform.GetChild(0).GetComponent <UILabel>().text = EB.Localizer.GetString("ID_PARTER_AWAKEN_BEFORE");
            awakenSkilllabel.text = awakenSkilllabel.transform.GetChild(0).GetComponent <UILabel>().text = EB.Localizer.GetString("ID_PARTER_AWAKEN_LATER");

            string cooldownStr = (pre.MaxCooldown > 0) ? (pre.MaxCooldown + EB.Localizer.GetString("ID_uifont_in_CombatHudV4_TurnFont_4")) : EB.Localizer.GetString("ID_SKILL_COOLDOWN_NOT");

            SkillCooldownLabel.text = string.Format("{0}{1}", EB.Localizer.GetString("ID_SKILL_COOLDOWN"), cooldownStr);

            PreSkillDes.text    = SkillDescTransverter.ChangeDescription(pre.Description, skilllevel, pre.ID);
            AwakenSkillDes.text = SkillDescTransverter.ChangeDescription(awaken.Description, skilllevel, awaken.ID);
            mDMono.gameObject.transform.localPosition = new Vector3(-1112, (BgSprite.height - 726) / 2, 0);
        }
Пример #2
0
        private string GetContext(Hotfix_LT.Data.SkillTemplate skillData, int skillLevel)
        {
            if (skillData == null)
            {
                return("");
            }

            if (!string.IsNullOrEmpty(skillData.Description))
            {
                return(SkillDescTransverter.ChangeDescription(skillData.Description, skillLevel, skillData.ID));
            }
            return("");
        }
Пример #3
0
        private string GetContext()
        {
            if (m_SkillData == null)
            {
                return("");
            }

            if (!string.IsNullOrEmpty(m_SkillData.Description))
            {
                return(SkillDescTransverter.ChangeDescription(m_SkillData.Description, skillLevel, m_SkillData.ID));
            }
            return("");
        }
Пример #4
0
        public void Init(int skillid, int level)
        {
            Container.transform.localPosition         = (SceneLogic.BattleType == eBattleType.ChallengeCampaign || SceneLogic.BattleType == eBattleType.AlienMazeBattle) ? TipInChallengePos : TipNormalPos;
            Container.GetComponent <UIPanel>().depth += 1;
            ShowUI(false);
            if (curSkillID != 0 && curSkillID == skillid && Container.gameObject.activeSelf)
            {
                return;
            }

            curSkillID = skillid;
            Hotfix_LT.Data.SkillTemplate skillTpl = Hotfix_LT.Data.SkillTemplateManager.Instance.GetTemplate(skillid);
            LTUIUtil.SetText(SkillNameLabel, skillTpl.Name);
            SkillDescLabel.text = SkillDescTransverter.ChangeDescription(skillTpl.Description, level, skillTpl.ID);
            SetSkillTargetLabel(skillTpl.SelectTargetType);
            string cooldownStr = (skillTpl.MaxCooldown > 0) ? (skillTpl.MaxCooldown + EB.Localizer.GetString("ID_uifont_in_CombatHudV4_TurnFont_4")) : EB.Localizer.GetString("ID_SKILL_COOLDOWN_NOT");

            SkillCooldownLabel.text = string.Format("{0}{1}", EB.Localizer.GetString("ID_SKILL_COOLDOWN"), cooldownStr);
            mBG.height = SkillDescLabel.height + bgHeight;
            ShowUI(true);
        }
Пример #5
0
        public void Fill(Hotfix_LT.Data.SkillTemplate tplData, int skillLevel)
        {
            if (tplData.Type == Hotfix_LT.Data.eSkillType.ACTIVE)
            {
                LTUIUtil.SetText(TypeTips, EB.Localizer.GetString("ID_codefont_in_UISkillDescContorller_4070"));
                TypeTipsBG.color = LT.Hotfix.Utility.ColorUtility.RedColor;
            }
            else if (tplData.Type == Hotfix_LT.Data.eSkillType.NORMAL)
            {
                LTUIUtil.SetText(TypeTips, EB.Localizer.GetString("ID_codefont_in_UISkillDescContorller_4440"));
                TypeTipsBG.color = LT.Hotfix.Utility.ColorUtility.PurpleColor;
            }
            else if (tplData.Type == Hotfix_LT.Data.eSkillType.PASSIVE)
            {
                LTUIUtil.SetText(TypeTips, EB.Localizer.GetString("ID_codefont_in_UISkillDescContorller_4751"));
                TypeTipsBG.color = LT.Hotfix.Utility.ColorUtility.BlueColor;
            }

            Icon.spriteName = tplData.Icon;
            LTUIUtil.SetText(Name, tplData.Name);
            LTUIUtil.SetText(Desc, SkillDescTransverter.ChangeDescription(tplData.Description, skillLevel, tplData.ID));
        }