示例#1
0
    // 更新英雄信息
    public void UpdateHeroInfo()
    {
        HeroTemplate heroItem = m_CurCard.GetHeroRow();

        // 英雄类型
        if (heroItem.getCamp() == 1)   //生灵
        {
            m_HeroType.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_01");
        }
        else if (heroItem.getCamp() == 2)   //神抵
        {
            m_HeroType.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_03");
        }
        else if (heroItem.getCamp() == 3)   //恶魔
        {
            m_HeroType.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_02");
        }

        m_Text_LV100.text = m_CurCard.GetHeroData().Level.ToString();
        m_Text_Title.text = GameUtils.getString(heroItem.getTitleID());
        //名称显示
        m_Text_Name.text = GameUtils.getString(heroItem.getNameID());

        // 星级
        int star = m_CurCard.GetHeroData().StarLevel;

        for (int i = 0; i < m_BrightStar.transform.childCount; ++i)
        {
            m_BrightStar.transform.GetChild(i).gameObject.SetActive(i < star);
        }
    }
示例#2
0
 /// <summary>
 /// 英雄类型图标/Tips数据
 /// </summary>
 /// m_Text_5:攻击类型Tipe文本
 /// m_Text_6:远程or进程Tips文本
 private void ShowTypeImgAndTips()
 {
     if (m_HeroData.getClientSignType()[0] == 0 && m_HeroData.getClientSignType()[1] == 0) //近战物理
     {
         m_Text_5.text           = GameUtils.getString("hero_info_tip1");                  //
         m_AttackTypeIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_06");
     }
     if (m_HeroData.getClientSignType()[0] == 0 && m_HeroData.getClientSignType()[1] == 1)//近战法术
     {
         m_Text_5.text           = GameUtils.getString("hero_info_tip3");
         m_AttackTypeIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_05");
     }
     if (m_HeroData.getClientSignType()[0] == 1 && m_HeroData.getClientSignType()[1] == 0)//远程物理
     {
         m_Text_5.text           = GameUtils.getString("hero_info_tip2");
         m_AttackTypeIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_04");
     }
     if (m_HeroData.getClientSignType()[0] == 1 && m_HeroData.getClientSignType()[1] == 1)//远程法术
     {
         m_Text_5.text           = GameUtils.getString("hero_info_tip4");
         m_AttackTypeIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_07");
     }
     if (m_HeroData.getClientSignType()[2] == 0)//肉盾
     {
         m_Text_6.text        = GameUtils.getString("hero_info_tip7");
         m_JobTypeIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_02");
     }
     if (m_HeroData.getClientSignType()[2] == 1)//输出
     {
         m_Text_6.text        = GameUtils.getString("hero_info_tip5");
         m_JobTypeIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_03");
     }
     if (m_HeroData.getClientSignType()[2] == 2)//辅助
     {
         m_Text_6.text        = GameUtils.getString("hero_info_tip6");
         m_JobTypeIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_01");
     }
     if (m_HeroData.getCamp() == 1)//生灵
     {
         m_RaceTypeIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_01");
     }
     if (m_HeroData.getCamp() == 2)//神抵
     {
         m_RaceTypeIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_03");
     }
     if (m_HeroData.getCamp() == 3)//恶魔
     {
         m_RaceTypeIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_02");
     }
 }
示例#3
0
 //英雄种族等信息
 private void InitHeroTypes()
 {
     if (_HeroItem.getClientSignType()[0] == 0 && _HeroItem.getClientSignType()[1] == 0)        //近战物理
     {
         AttackTypeTipsText.text = GameUtils.getString("hero_info_tip1");
         AttackTypeImg.sprite    = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_06");
     }
     if (_HeroItem.getClientSignType()[0] == 0 && _HeroItem.getClientSignType()[1] == 1)        //近战法术
     {
         AttackTypeTipsText.text = GameUtils.getString("hero_info_tip3");
         AttackTypeImg.sprite    = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_05");
     }
     if (_HeroItem.getClientSignType()[0] == 1 && _HeroItem.getClientSignType()[1] == 0)        //远程物理
     {
         AttackTypeTipsText.text = GameUtils.getString("hero_info_tip2");
         AttackTypeImg.sprite    = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_04");
     }
     if (_HeroItem.getClientSignType()[0] == 1 && _HeroItem.getClientSignType()[1] == 1)        //远程法术
     {
         AttackTypeTipsText.text = GameUtils.getString("hero_info_tip4");
         AttackTypeImg.sprite    = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_07");
     }
     if (_HeroItem.getClientSignType()[2] == 0)        //肉盾
     {
         JobTypeTipsText.text = GameUtils.getString("hero_info_tip7");
         JobTypeImg.sprite    = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_02");
     }
     if (_HeroItem.getClientSignType()[2] == 1)        //输出
     {
         JobTypeTipsText.text = GameUtils.getString("hero_info_tip5");
         JobTypeImg.sprite    = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_03");
     }
     if (_HeroItem.getClientSignType()[2] == 2)        //辅助
     {
         JobTypeTipsText.text = GameUtils.getString("hero_info_tip6");
         JobTypeImg.sprite    = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_01");
     }
     if (_HeroItem.getCamp() == 1)        //生灵
     {
         RaceTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_01");
     }
     if (_HeroItem.getCamp() == 2)        //神抵
     {
         RaceTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_03");
     }
     if (_HeroItem.getCamp() == 3)        //恶魔
     {
         RaceTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_02");
     }
 }
        /// <summary>
        /// 初始化英雄类型图标 [Lyq]
        /// </summary>
        /// <param name="heroData">英雄表数据</param>
        /// <param name="attackTypeImg">攻击类型</param>
        /// <param name="jobTypeImg">职业类型</param>
        /// <param name="raceTypeImg">种族类型</param>
        public void ShowHeroImg(HeroTemplate heroData, Image attackTypeImg, Image jobTypeImg, Image raceTypeImg)
        {
            if (heroData.getClientSignType()[0] == 0 && heroData.getClientSignType()[1] == 0)//近战物理
            {
                attackTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_06");
            }
            else if (heroData.getClientSignType()[0] == 0 && heroData.getClientSignType()[1] == 1)//近战法术
            {
                attackTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_05");
            }
            else if (heroData.getClientSignType()[0] == 1 && heroData.getClientSignType()[1] == 0)//远程物理
            {
                attackTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_04");
            }
            else if (heroData.getClientSignType()[0] == 1 && heroData.getClientSignType()[1] == 1)//远程法术
            {
                attackTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_07");
            }

            if (heroData.getClientSignType()[2] == 0)//肉盾
            {
                jobTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_02");
            }
            else if (heroData.getClientSignType()[2] == 1)//输出
            {
                jobTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_03");
            }
            else if (heroData.getClientSignType()[2] == 2)//辅助
            {
                jobTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_01");
            }

            if (heroData.getCamp() == 1)//生灵
            {
                raceTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_01");
            }
            else if (heroData.getCamp() == 2)//神抵
            {
                raceTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_03");
            }
            else if (heroData.getCamp() == 3)//恶魔
            {
                raceTypeImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_02");
            }
        }
 //英雄种族等信息
 private void InitHeroTypes(HeroTemplate _HeroItem)
 {
     if (_HeroItem.getClientSignType()[0] == 0 && _HeroItem.getClientSignType()[1] == 0)//近战物理
     {
         mType1.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_06");
     }
     if (_HeroItem.getClientSignType()[0] == 0 && _HeroItem.getClientSignType()[1] == 1)//近战法术
     {
         mType1.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_05");
     }
     if (_HeroItem.getClientSignType()[0] == 1 && _HeroItem.getClientSignType()[1] == 0)//远程物理
     {
         mType1.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_04");
     }
     if (_HeroItem.getClientSignType()[0] == 1 && _HeroItem.getClientSignType()[1] == 1)//远程法术
     {
         mType1.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_07");
     }
     if (_HeroItem.getClientSignType()[2] == 0)//肉盾
     {
         mType2.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_02");
     }
     if (_HeroItem.getClientSignType()[2] == 1)//输出
     {
         mType2.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_03");
     }
     if (_HeroItem.getClientSignType()[2] == 2)//辅助
     {
         mType2.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_clientSignType_01");
     }
     if (_HeroItem.getCamp() == 1)//生灵
     {
         mAlignment.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_01");
     }
     if (_HeroItem.getCamp() == 2)//神抵
     {
         mAlignment.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_03");
     }
     if (_HeroItem.getCamp() == 3)//恶魔
     {
         mAlignment.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "UI_Zhongzu_02");
     }
 }
示例#6
0
 /// <summary>
 /// 初始分类
 /// </summary>
 private void InitClassify()
 {
     for (int i = 0; i < m_HeroHandBookList.Count; i++)
     {
         int          _heroId = m_HeroHandBookList[i].getContentId();
         HeroTemplate _hero   = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(_heroId);
         if (_hero.getCamp() == 1)
         {
             m_PeopleHandBooks.Add(m_HeroHandBookList[i]);
         }
         else if (_hero.getCamp() == 2)
         {
             m_GodHandBooks.Add(m_HeroHandBookList[i]);
         }
         else if (_hero.getCamp() == 3)
         {
             m_DevilHandBooks.Add(m_HeroHandBookList[i]);
         }
     }
 }
        /// <summary>
        /// 返回英雄种族类型图标 [Lyq]
        /// </summary>
        /// <param name="heroData">英雄T</param>
        /// <returns></returns>
        public Sprite GetHeroRaceTypeIcon(HeroTemplate heroT)
        {
            switch (heroT.getCamp())
            {
            case 1:    //生灵
                return(UIResourceMgr.LoadSprite(common.defaultPath + "icon_TY_0005"));

            case 2:    //神抵
                return(UIResourceMgr.LoadSprite(common.defaultPath + "icon_TY_0009"));

            case 3:    //恶
                return(UIResourceMgr.LoadSprite(common.defaultPath + "icon_TY_0006"));

            default:
                LogManager.Log("Fack  又填错表");
                return(null);
            }
        }