public override void ShowHeroInfo(ObjectCard objectCard) { m_HeroData = objectCard.GetHeroData(); m_HeroDataT = objectCard.GetHeroRow(); m_CurTData = GameUtils.GetCurAdvancedData(m_HeroDataT.getBorn(), m_HeroDataT.getQosition(), m_HeroData.StarLevel, m_HeroData.CurStage); m_NextTData = GameUtils.GetHeroNextAdvancedData(objectCard); YesAdvancedEffect.gameObject.SetActive(false); if (m_HeroData.StarLevel == m_NextTData.getQuality() && m_HeroData.CurStage == m_NextTData.getHalosPn()) { m_MaxLevelWindow.SetActive(true); m_NoMaxLevelWindow.SetActive(false); } else { m_MaxLevelWindow.SetActive(false); m_NoMaxLevelWindow.SetActive(true); InitShowStarAndStage(); GreatAttributeItem(); GreatArticleItem(); } RefreshLevelNoEnoughtTip(); }
/// <summary> /// 返回英雄资质Sprite /// </summary> /// <param name="heroT"></param> /// <returns></returns> public Sprite GetHeroAptImg(HeroTemplate heroT) { switch (heroT.getBorn()) { case 1: return(UIResourceMgr.LoadSprite(common.defaultPath + "icon_YXQH_0003")); case 2: return(UIResourceMgr.LoadSprite(common.defaultPath + "icon_YXQH_0002")); case 3: return(UIResourceMgr.LoadSprite(common.defaultPath + "icon_YXQH_0001")); case 4: return(UIResourceMgr.LoadSprite(common.defaultPath + "icon_YXQH_0000")); // case 5: // return UIResourceMgr.LoadSprite(common.defaultPath + ""); // case 6: // return UIResourceMgr.LoadSprite(common.defaultPath + ""); default: LogManager.Log("坑"); return(UIResourceMgr.LoadSprite(common.defaultPath + "")); } }
public override void UpdateUIView() { int curStarMaxRank = GameUtils.GetCurStarMaxHalosPn(m_HeroDataT.getBorn(), m_HeroDataT.getQosition(), m_HeroData.StarLevel);//当前星级的最大阶数 if (m_HeroData.CurStage >= curStarMaxRank) { NoAdvancedEffect.localPosition = new Vector3(m_GrayGO[0].GetComponent <RectTransform>().anchoredPosition.x, NoAdvancedEffect.localPosition.y, NoAdvancedEffect.localPosition.z); YesAdvancedEffect.localPosition = new Vector3(m_GrayGO[0].GetComponent <RectTransform>().anchoredPosition.x, YesAdvancedEffect.localPosition.y, YesAdvancedEffect.localPosition.z); NoAdvancedEffect.gameObject.SetActive(false); } else { NoAdvancedEffect.localPosition = new Vector3(m_GrayGO[m_HeroData.CurStage].GetComponent <RectTransform>().anchoredPosition.x, NoAdvancedEffect.localPosition.y, NoAdvancedEffect.localPosition.z); YesAdvancedEffect.localPosition = new Vector3(m_GrayGO[m_HeroData.CurStage].GetComponent <RectTransform>().anchoredPosition.x, YesAdvancedEffect.localPosition.y, YesAdvancedEffect.localPosition.z); NoAdvancedEffect.gameObject.SetActive(true); } }
/// <summary> /// 获取对应的表数据 /// </summary> /// <param name="id">1火,2土,3水,4风</param> /// /// <param>英雄数据中 是存在数组中的 所以相应的id + 1</param> private void GetTData(int id) { if (m_HeroData == null && m_HeroDataT == null) { return; } HeroTrainDB.ENUM_TRAIN_TYPE type = (HeroTrainDB.ENUM_TRAIN_TYPE)(id); m_ElementLevel = m_HeroData.HeroTrainDB.GetTrainLevForType(type); m_MaxElementLevel = GameUtils.GetCurCultureTData(m_HeroDataT.getBorn(), m_HeroDataT.getQosition(), id + 1); m_CurTData = GameUtils.GetCurCultureTData(m_HeroDataT.getBorn(), m_HeroDataT.getQosition(), id + 1, m_ElementLevel); m_NextTData = GameUtils.GetCurCultureTData(m_HeroDataT.getBorn(), m_HeroDataT.getQosition(), id + 1, m_ElementLevel + 1); ClearUp(); ShowElementLevel(); ShowElementAddValue(); GreatArticleItem(); BringButtonActive(); }
public void SetData(ObjectCard objectCard) { mObjectCard = objectCard; HeroData heroData = objectCard.GetHeroData(); HeroTemplate heroT = objectCard.GetHeroRow(); //----英雄信息---- m_Name.text = string.Format(GameUtils.GetHeroNameFontColor(heroData.QualityLev), GameUtils.getString(heroT.getNameID())); m_Alias.text = string.Format(GameUtils.GetHeroNameFontColor(heroData.QualityLev), GameUtils.getString(heroT.getTitleID())); //InterfaceControler.GetInst().ReturnHeroQuailty(heroData.QualityLev); //GameUtils.GetItemQualitySprite() //TODO:资质图; m_ApitudeImg.sprite = InterfaceControler.GetInst().GetHeroAptImg(heroT); InterfaceControler.GetInst().ShowTypeIcon(heroT, m_HeroTypeImg); m_Value.text = heroData.Level + "/" + heroT.getMaxLevel(); m_ExpTxt.text = heroData.Exp + "/" + objectCard.GetAllExp(); m_ExpSlider.value = heroData.GetExpPercentage(); int maxStar = GameUtils.GetCurStarMax(heroT.getBorn(), heroT.getQosition(), heroData.QualityLev); mStarGroup.ShowStar(heroData.StarLevel, 6); //----模型---- StartCoroutine(Show3DModel()); //----属性----; m_AText0.text = GameUtils.getString("power"); m_AText1.text = GameUtils.getString("attribute1name"); m_AText2.text = GameUtils.getString("attribute2name"); m_AText3.text = GameUtils.getString("attribute3name"); m_AValue0.text = heroData.FightVigor.ToString(); m_AValue1.text = objectCard.GetPhysicalAttack().ToString(); m_AValue2.text = objectCard.GetPhysicalDefence().ToString(); m_AValue3.text = objectCard.GetMaxHP().ToString(); //----特点---- m_FeatureTxt.text = GameUtils.getString(heroT.getTedian()); //----技能---- List <int> skillIds = heroData.HeroSkillDB.SkillList; if (skillIds == null || skillIds.Count != 6) { LogManager.LogError("技能个数不为6个"); return; } for (int i = 0; i < skillIds.Count; i++) { //是否解锁了; bool isUnlock = IsSkillLocked(i); SkillTemplate skillT = DataTemplate.GetInstance().m_SkillTable.getTableData(skillIds[i]) as SkillTemplate; mSkillIcons[i].SetIcon(skillT.getSkillIcon()); mSkillIcons[i].SetName(skillT.getSkillName()); mSkillIcons[i].SetType(skillT.getSkillType()); if (isUnlock) { mSkillIcons[i].SetLevel(skillT.getSkillLevel().ToString()); } else { mSkillIcons[i].SetHint(string.Format(GameUtils.getString("skillunlockquality"), GameUtils.ConverQualityToStr(i + 1))); } } //----简介---- m_IntroductTxt.text = GameUtils.getString(heroT.getDescriptionID()); }