Exemplo n.º 1
0
        //初始化掉落英雄
        public void InitHero(HeroTemplate _herodata)
        {
            GoodImage = selfTransform.FindChild("Good_Image").GetComponent <Image>();
            GoodName  = selfTransform.FindChild("Good_Name").GetComponent <Text>();
            GoodNums  = selfTransform.FindChild("Good_Nums").GetComponent <Text>();
            Stars     = selfTransform.FindChild("Star_Image").gameObject;
            Stars.SetActive(true);
            GoodName.enabled = true;
            GoodNums.enabled = false;
            ArtresourceTemplate _Artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(_herodata.getArtresources());
            Sprite _img = UIResourceMgr.LoadSprite(common.defaultPath + _Artresourcedata.getHeadiconresource());

            GoodImage.sprite = _img;
            ChsTextTemplate chs = (ChsTextTemplate)DataTemplate.GetInstance().m_ChsTextTable.getTableData(_herodata.getTitleID());

            GoodName.text = chs.languageMap["Chinese"];
            int starNum = _herodata.getQuality();
            int maxStar = _herodata.getMaxQuality();

            //for (int i = 5; i < 5 + starNum; ++i)
            //{
            //    Stars.transform.GetChild(i).GetComponent<Image>().enabled = true;
            //}
            for (int i = 0; i < 5; i++)
            {
                Stars.transform.GetChild(i).GetComponent <Image>().enabled     = i < maxStar;
                Stars.transform.GetChild(i + 5).GetComponent <Image>().enabled = i < starNum;
            }
        }
Exemplo n.º 2
0
        //初始化怪物卡牌
        public void InitMonsterCard(MonsterTemplate _monster)
        {
            Parent = selfTransform.FindChild("Parent");
            Image Boss_Image = Parent.FindChild("Boss_Image").GetComponent <Image>();

            CardNameText      = Parent.FindChild("Name_txt").GetComponent <Text>();
            _CardLevelText    = Parent.FindChild("Level_txt");
            CardImage         = Parent.FindChild("Icon_Img").GetComponent <Image>();
            CardStar          = _monster.getMonsterstar();
            maxStar           = _monster.getMonstermaxstar();
            CardLevel         = _monster.getMonsterlevel();
            CardName          = GameUtils.getString(_monster.getMonstername());
            CardNameText.text = CardName;//名称
            InterfaceControler.GetInst().AddLevelNum(CardLevel.ToString(), _CardLevelText, url);
            _Artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(_monster.getArtresources());
            Sprite _img = UIResourceMgr.LoadSprite(common.defaultPath + _Artresourcedata.getHeadiconresource());

            CardImage.sprite = _img;//图片

            for (int i = 0; i < 5; i++)
            {
                Image temp = Parent.FindChild("Star_Image").GetChild(i).GetComponent <Image>();
                temp.enabled = i < maxStar;

                temp         = Parent.FindChild("Star_Image").GetChild(i + 5).GetComponent <Image>();
                temp.enabled = i < CardStar;
            }

            Boss_Image.enabled = _monster.getMonstertype() == 2 ? true : false;
        }
Exemplo n.º 3
0
    // 更新英雄显示信息
    public void UpdateHeroShow(ObjectCard heroCard)
    {
        m_HeroCard = heroCard;

        // 等级
        m_Level.text = /*"Lv." +*/ "<color=yellow>" + heroCard.GetHeroData().Level.ToString() + "</color>";

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

        for (int i = 0; i < m_BrightStar.transform.childCount; ++i)
        {
            m_BrightStar.transform.GetChild(i).gameObject.SetActive(i < star);
        }

        // icon
        ArtresourceTemplate artresourcedata = ( ArtresourceTemplate )DataTemplate.GetInstance().m_ArtresourceTable.getTableData(heroCard.GetHeroData().GetHeroViewID());
        Sprite img = UIResourceMgr.LoadSprite(common.defaultPath
                                              + artresourcedata.getHeadiconresource());

        m_Icon.sprite = img;
        m_Icon.SetNativeSize();


        // icon bg TODO...
        m_IconBg.sprite = InterfaceControler.GetInst().ReturnHeroQuailty(heroCard.GetHeroData().QualityLev);
    }
Exemplo n.º 4
0
    // 显示每一个英雄的数据        英雄的表数据          对应的神器         需要的英雄数量    索引
    public void ShowInfo(HeroTemplate heroData, Artifact artifact, int heroNumber, int index)
    {
        _heroData = heroData;
        _artifact = artifact;
        tableID   = heroData.getId();

        // 星级
        int quality = heroData.getQuality();

        for (int i = 5; i < quality + 5; i++)
        {
            _star.transform.GetChild(i).gameObject.SetActive(true);
        }

        // icon
        ArtresourceTemplate artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(heroData.getArtresources());
        Sprite _img = UIResourceMgr.LoadSprite(common.defaultPath + artresourcedata.getHeadiconresource());

        _icon.sprite = _img;        //图片
        _icon.SetNativeSize();

        // 名称
        _name.text = GameUtils.getString(heroData.getTitleID());

        ShowCount(index, heroNumber);
    }
Exemplo n.º 5
0
    public static string GetAwardSpriteName(int AwardId)
    {
        string _result = null;

        EM_OBJECT_CLASS _awardClass = GameUtils.GetObjectClassById(AwardId);

        switch (_awardClass)
        {
        case EM_OBJECT_CLASS.EM_OBJECT_CLASS_RES:
            ResourceindexTemplate _resTable = DataTemplate.GetInstance().m_ResourceindexTemplate.getTableData(AwardId) as ResourceindexTemplate;
            if (_resTable != null)
            {
                _result = _resTable.getIcon3();
            }
            break;

        case EM_OBJECT_CLASS.EM_OBJECT_CLASS_RUNE:
            ItemTemplate _itemTable = DataTemplate.GetInstance().m_ItemTable.getTableData(AwardId) as ItemTemplate;
            if (_itemTable != null)
            {
                _result = _itemTable.getIcon_s();
            }
            break;

        case EM_OBJECT_CLASS.EM_OBJECT_CLASS_COMMON:
            ItemTemplate _runeTable = DataTemplate.GetInstance().m_ItemTable.getTableData(AwardId) as ItemTemplate;
            if (_runeTable != null)
            {
                _result = _runeTable.getIcon_s();
            }
            break;

        case EM_OBJECT_CLASS.EM_OBJECT_CLASS_HERO:
            HeroTemplate _heroTable = DataTemplate.GetInstance().m_HeroTable.getTableData(AwardId) as HeroTemplate;

            if (_heroTable != null)
            {
                ArtresourceTemplate _atrResTable = DataTemplate.GetInstance().m_ArtresourceTable.getTableData(_heroTable.getArtresources()) as ArtresourceTemplate;
                _result = _atrResTable.getHeadiconresource();
            }
            break;

        case EM_OBJECT_CLASS.EM_OBJECT_CLASS_SKIN:
            ArtresourceTemplate _atrResTable1 = DataTemplate.GetInstance().m_ArtresourceTable.getTableData(AwardId) as ArtresourceTemplate;
            if (_atrResTable1 != null)
            {
                _result = _atrResTable1.getHeadiconresource();
            }
            break;

        default:
            break;
        }

        return(_result);
    }
Exemplo n.º 6
0
 /// <summary>
 /// 初始化数据显示
 /// </summary>
 private void InitHeroCloneUIData()
 {
     m_CloneConAssetId  = m_HeroCloneData.getCloneCostId();
     m_CloneConAssetNum = m_HeroCloneData.getCloneCostValue();
     m_OpenCloneDes     = GameUtils.getString(m_HeroCloneData.getOpenConditionDes());
     m_HeroName.text    = GameUtils.getString(m_HeroData.getTitleID());
     m_EliteNum.text    = m_CloneConAssetNum.ToString();
     m_OpenTjTxt.text   = m_OpenCloneDes;
     m_HeroIcon.sprite  = UIResourceMgr.LoadSprite(common.defaultPath + m_AssetData.getHeadiconresource());
 }
Exemplo n.º 7
0
        //显示基础属性
        private void SetBaseInfo(int lv)
        {
            CardName          = GameUtils.getString(_Herodata.getTitleID());
            CardNameText.text = CardName;//名称
            CardLevel         = lv;
            InterfaceControler.GetInst().AddLevelNum(CardLevel.ToString(), _CardLevelText, url);
            _Artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(HeroObject.GetHeroData().GetHeroViewID());
            CardImage.sprite = UIResourceMgr.LoadSprite(common.defaultPath + _Artresourcedata.getHeadiconresource());

            InterfaceControler.GetInst().AddSharLevel(Parent.FindChild("Star_Image"), _Herodata);
        }
Exemplo n.º 8
0
        public void InitIcon()
        {
            HeroTemplate ht = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(heroId);

            this.skillId = ht.getSkill1ID();
            mSkillInfo   = (SkillTemplate)DataTemplate.GetInstance().m_SkillTable.getTableData(skillId);

            ArtresourceTemplate at = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(ht.getArtresources());

            mMaxCoolDownTime = mSkillInfo.getCooldown() / 1000.0f;

            GameEventDispatcher.Inst.addEventListener(GameEventID.F_FightStateUpdate, SetSkillStatus);

            // GameObject button = transform.FindChild("Icon").gameObject;
            transform.GetComponent <Button>().onClick.AddListener(new UnityEngine.Events.UnityAction(OnSkillClick));
            //button.AddComponent<Button>().onClick.AddListener(new UnityEngine.Events.UnityAction(OnSkillClick));

            m_HeroIcon        = transform.FindChild("touxiang/Image(heroicon)").gameObject.GetComponent <Image>();
            m_HeroIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + at.getHeadiconresource());
            //hero.SetNativeSize();

            m_SkillIcon        = transform.FindChild("Image(skillicon)").GetComponent <Image>();
            m_SkillIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + mSkillInfo.getSkillIcon());

            //int groupPostion= ObjectSelf.GetInstance().Teams.GetGroupPosByHeroGuid(mHero.GetGuid());
            //if (groupPostion != -1)
            //{
            //    if (groupPostion == 1)
            //    {
            //       m_FormPostion.sprite= UIResourceMgr.LoadSprite(common.defaultPath + "ui_zhenxing_02");
            //    }
            //    else if (groupPostion == 2)
            //    {
            //        m_FormPostion.sprite = UIResourceMgr.LoadSprite(common.defaultPath + "ui_zhenxing_01");
            //    }
            //}
            //iconImg.SetNativeSize();

            //Transform cdObj = iconImg.transform.FindChild("CD");
            //cdIcon = cdObj.GetComponent<Image>();

            //// 设置星级
            //int istart = ht.getQuality();

            //for (int idx = 0; idx < GlobalMembers.HeroMaxStar; idx++)
            //{
            //    mStarTrans.GetChild(idx).gameObject.SetActive(idx<istart);
            //}
            // set skill level
            // 设置英雄等级
            //mLevel.text = (mSkillInfo.getSkillCostNum1()/30).ToString();
            mLevel.text = mHero.GetHeroData().Level.ToString();
        }
Exemplo n.º 9
0
    /// <summary>
    /// 初始化数据
    /// </summary>
    /// <param name="heroId">英雄id</param>
    public void InitData(int heroId)
    {
        HeroTemplate hero = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(heroId);

        if (hero == null)
        {
            Debug.LogError("找不到英雄数据 id:" + heroId);
            return;
        }
        m_HeroName.text = GameUtils.getString(hero.getTitleID());
        InterfaceControler.GetInst().ShowTypeIcon(hero, m_Type, m_TypeText);
        m_FragmentCount.text = string.Format("碎片数量:<color=#FF0000>{0}</color>/{1}", ObjectSelf.GetInstance().CommonItemContainer.GetFragmentCount(hero.GetID()), hero.getSyntheticCount());
        ArtresourceTemplate _Artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(hero.getArtresources());

        m_HeroIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + _Artresourcedata.getHeadiconresource());
        m_Zizhi.sprite    = InterfaceControler.GetInst().GetHeroAptImg(hero);
        m_Desc.text       = GameUtils.getString(hero.getTedian());
        SetTextColorByQuilt(hero.getQuality());
    }
Exemplo n.º 10
0
    public void ShowInfo(ArtifactTemplate artifact, int index, bool isReach = false)
    {
        if (isReach)
        {
            _reach.SetActive(true);
            _count.SetActive(false);
            _possess.SetActive(false);
        }

        HeroTemplate heroData = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(artifact.getHeroID()[index]);
        // 星级
        int quality = heroData.getQuality();

        for (int i = 5; i < quality + 5; i++)
        {
            _star.transform.GetChild(i).gameObject.SetActive(true);
        }

        // icon
        ArtresourceTemplate artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(heroData.getArtresources());
        Sprite _img = UIResourceMgr.LoadSprite(common.defaultPath + artresourcedata.getHeadiconresource());

        _icon.sprite = _img;        //图片

        // 名称
        _name.text = GameUtils.getString(heroData.getTitleID());

        // 现在的英雄数量
        Text curCount = _count.transform.FindChild("CurCount").GetComponent <Text>();

        curCount.text = "0";

        // 需要的英雄的数量
        Text needCount = _count.transform.FindChild("NeedCount").GetComponent <Text>();

        needCount.text = "/" + artifact.getHeroNum()[index].ToString();

        // 每一个英雄的 iD
        int heroID = artifact.getHeroID()[index];

        _possess.transform.FindChild("Number").GetComponent <Text>().text = GetHeroCount(heroID).ToString();
    }
Exemplo n.º 11
0
    public void Initialize(ObjectCard objHero)
    {
        this.objHero = objHero;
        if (tableId == null)
        {
            return;
        }
        _HeroItem = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(tableId);
        //卡牌图标
        ArtresourceTemplate _Artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(objHero.GetHeroData().GetHeroViewID());
        Sprite _img = UIResourceMgr.LoadSprite(url + _Artresourcedata.getHeadiconresource());

        _icon.sprite = _img;
        _icon.SetNativeSize();

        //星级
        m_heroStar = _HeroItem.getQuality();
        for (int i = 5; i < 5 + m_heroStar; ++i)
        {
            Image temp = selfTransform.FindChild("Star_Image").GetChild(i).GetComponent <Image>();
            temp.enabled = true;
            temp.gameObject.SetActive(true);
        }
    }
Exemplo n.º 12
0
    public void GiftShows()
    {
        // GameEventDispatcher.Inst.dispatchEvent(GameEventID.KE_KnapsackUpdateShow);
        for (int i = 0; i < itemList.Count; i++)
        {
            Destroy(itemList[i]);
        }
        itemList.Clear();
        giftList = UI_ItemsManage._instance.giftIDList;
        for (int i = 0; i < giftList.Count; i++)
        {
            InnerdropTemplate inner = (InnerdropTemplate)DataTemplate.GetInstance().m_InnerdropTable.getTableData(giftList[i]);
            int itemid = inner.getObjectid() / 1000000;
            switch (itemid)
            {
            case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_RES:
                if (itemid == 1400)
                {
                    GameObject item = Instantiate(Resources.Load("UI/Prefabs/UI_Bag/item"), transform.position, transform.rotation) as GameObject;
                    item.transform.parent     = mGrid;
                    item.transform.localScale = Vector3.one;
                    UI_RewardsItemManage  uifigt = item.GetComponent <UI_RewardsItemManage>();
                    ResourceindexTemplate itemT  = (ResourceindexTemplate)DataTemplate.GetInstance().m_ResourceindexTemplate.getTableData(inner.getObjectid());
                    uifigt.mName.text = GameUtils.getString(itemT.getName());
                    itemT.getIcon3();
                    uifigt.mIcon.overrideSprite = UIResourceMgr.LoadSprite(common.defaultPath + itemT.getIcon3());
                    uifigt.mNum.text            = "x" + inner.getDropnum();
                    itemList.Add(item);
                }
                break;

            case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_RUNE:
            {
                GameObject item = Instantiate(Resources.Load("UI/Prefabs/UI_Bag/rune"), transform.position, transform.rotation) as GameObject;
                item.transform.parent     = mGrid;
                item.transform.localScale = Vector3.one;
                ItemTemplate         itemTable = (ItemTemplate)DataTemplate.GetInstance().m_ItemTable.getTableData(inner.getObjectid());
                UI_RewardsItemManage uifigt    = item.GetComponent <UI_RewardsItemManage>();
                uifigt.mName.text           = GameUtils.getString(itemTable.getName());
                uifigt.typeNum              = 1;
                uifigt.id                   = inner.getObjectid();
                uifigt.mIcon.overrideSprite = UIResourceMgr.LoadSprite(common.defaultPath + itemTable.getIcon());
                uifigt.mNum.text            = "x" + inner.getDropnum().ToString();
                itemList.Add(item);
            }
            break;

            case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_COMMON:
            {
                GameObject item = Instantiate(Resources.Load("UI/Prefabs/UI_Bag/item"), transform.position, transform.rotation) as GameObject;
                item.transform.parent     = mGrid;
                item.transform.localScale = Vector3.one;
                ItemTemplate         itemTable = (ItemTemplate)DataTemplate.GetInstance().m_ItemTable.getTableData(inner.getObjectid());
                UI_RewardsItemManage uifigt    = item.GetComponent <UI_RewardsItemManage>();
                uifigt.id                   = inner.getObjectid();
                uifigt.typeNum              = 2;
                uifigt.mName.text           = GameUtils.getString(itemTable.getName());
                uifigt.mIcon.overrideSprite = UIResourceMgr.LoadSprite(common.defaultPath + itemTable.getIcon());
                uifigt.mNum.text            = "x" + inner.getDropnum().ToString();
                itemList.Add(item);
            }
            break;

            case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_HERO:
            {
                GameObject item = Instantiate(Resources.Load("UI/Prefabs/UI_Bag/hero"), transform.position, transform.rotation) as GameObject;
                item.transform.parent     = mGrid;
                item.transform.localScale = Vector3.one;
                HeroTemplate         hero   = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(inner.getObjectid());
                UI_RewardsItemManage uihero = item.GetComponent <UI_RewardsItemManage>();
                uihero.id         = inner.getObjectid();
                uihero.typeNum    = 3;
                uihero.mName.text = GameUtils.getString(hero.getTitleID());        //"英雄";
                ArtresourceTemplate art = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(hero.getArtresources());
                uihero.mIcon.overrideSprite = UIResourceMgr.LoadSprite(common.defaultPath + art.getHeadiconresource());
                int star    = hero.getQuality();
                int maxStar = hero.getMaxQuality();
                for (int j = 0; j < 5; j++)
                {
                    uihero.starList[j].SetActive(j < star);
                    uihero.starList[j + 5].SetActive(j < maxStar);
                }

                itemList.Add(item);
            }
            break;

            default:
                break;
            }
        }
    }
Exemplo n.º 13
0
    public void Init(int ID, int isReceive)
    {
        //int itemid = ID / 1000000;
        if (isReceive == 0)
        {
            ReceiveGo.SetActive(false);
        }
        else
        {
            ReceiveGo.SetActive(true);
        }

        InnerdropTemplate item = (InnerdropTemplate)DataTemplate.GetInstance().m_InnerdropTable.getTableData(ID);

        NumText.text = "x" + item.getDropnum().ToString();
        int _goid  = item.getObjectid();//掉落物ID
        int itemid = item.getObjectid() / 1000000;

        switch (itemid)
        {
        case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_RES:     //资源
            ResourceindexTemplate _temp_res = (ResourceindexTemplate)DataTemplate.GetInstance().m_ResourceindexTemplate.getTableData(_goid);
            if (_temp_res != null)
            {
                GoName.text = GameUtils.getString(_temp_res.getName());
                string _tempIconNam_1 = _temp_res.getIcon3();
                SpriteImage.sprite = UIResourceMgr.LoadSprite(common.defaultPath + _tempIconNam_1);
            }
            break;

        case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_RUNE:    //符文
            ItemTemplate _temp_rune = (ItemTemplate)DataTemplate.GetInstance().GetItemTemplateById(_goid);
            if (_temp_rune != null)
            {
                GoName.text = GameUtils.getString(_temp_rune.getName());
                SpriteImage.gameObject.SetActive(false);
                RuneIcon.SetActive(true);
                ShowRune(_temp_rune);
            }
            break;

        case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_COMMON:     //道具
            ItemTemplate _temp_common = (ItemTemplate)DataTemplate.GetInstance().GetItemTemplateById(_goid);
            if (_temp_common != null)
            {
                GoName.text = GameUtils.getString(_temp_common.getName());
                string _tempIconNam_3 = _temp_common.getIcon_s();
                SpriteImage.sprite = UIResourceMgr.LoadSprite(common.defaultPath + _tempIconNam_3);
            }
            break;

        case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_HERO:     //英雄
            HeroTemplate _temp_hero = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(_goid);
            if (_temp_hero != null)
            {
                GoName.text = GameUtils.getString(_temp_hero.getNameID());
                int _tempIconNam_4 = _temp_hero.getArtresources();

                ArtresourceTemplate _temp_Art = (ArtresourceTemplate)DataTemplate.GetInstance().GetArtResourceTemplate(_tempIconNam_4);
                string _tempIconNam_5         = _temp_Art.getHeadiconresource();
                SpriteImage.sprite = UIResourceMgr.LoadSprite(common.defaultPath + _tempIconNam_5);

                NumText.transform.parent.gameObject.SetActive(false);
                this.star.gameObject.SetActive(true);
                int star    = _temp_hero.getQuality();
                int maxStar = _temp_hero.getMaxQuality();
                this.star.Set(star, maxStar);
            }
            break;

        case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_SKIN:     //皮肤
            ArtresourceTemplate _temp_Art_2 = (ArtresourceTemplate)DataTemplate.GetInstance().GetArtResourceTemplate(_goid);
            if (_temp_Art_2 != null)
            {
                GoName.text = GameUtils.getString(_temp_Art_2.getNameID());
                string _tempIconNam_6 = _temp_Art_2.getHeadiconresource();
                SpriteImage.sprite = UIResourceMgr.LoadSprite(common.defaultPath + _tempIconNam_6);
            }
            break;
        }
    }
Exemplo n.º 14
0
    /// <summary>
    /// 填充数据
    /// </summary>
    /// <param name="id">掉落包小包id</param>
    public void FillData(int id)
    {
        //通过id 区分出是资源 物品 英雄 还是其他
        //1400000001 - 1400999999	资源 对应数据表53
        //1401000001 - 1401999999	符文 对应数据表26
        //1402000001 - 1402999999	道具 对应数据表26
        //1403000001 - 1403999999	英雄 对应数据表01
        InnerdropTemplate innerTemplate = DataTemplate.GetInstance().GetInnerdropTemplateById(id);

        if (innerTemplate == null)
        {
            Debug.LogError("Innerdrop表中没有对应的id:" + id);
            return;
        }
        int ItemId = innerTemplate.getObjectid();

        if (ItemId >= 1400000001 && ItemId <= 1400999999)//资源
        {
            ResourceindexTemplate template = (ResourceindexTemplate)DataTemplate.GetInstance().m_ResourceindexTemplate.getTableData(ItemId);
            if (template != null)
            {
                m_Icon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + template.getIcon1());
                name.text     = GameUtils.getString(template.getName());
                count.text    = "x" + innerTemplate.getDropnum().ToString();
                m_Stars[0].transform.parent.gameObject.SetActive(false);
                m_Rune.SetActive(false);
                m_Icon.gameObject.SetActive(true);
            }
            else
            {
                Debug.LogError(string.Format("找不到id{0}的为物品", ItemId));
            }
        }
        else if (ItemId >= 1402000001 && ItemId <= 1402999999) //道具
        {
            ItemTemplate template = DataTemplate.GetInstance().GetItemTemplateById(ItemId);
            if (template != null)
            {
                m_Icon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + template.getIcon_s());
                name.text     = GameUtils.getString(template.getName());
                count.text    = "x" + innerTemplate.getDropnum().ToString();
                m_Stars[0].transform.parent.gameObject.SetActive(false);
                m_Rune.SetActive(false);
                m_Icon.gameObject.SetActive(true);
            }
            else
            {
                Debug.LogError(string.Format("找不到id{0}的为物品", ItemId));
            }
        }
        else if (ItemId >= 1401000001 && ItemId <= 1401999999) //符文
        {
            ItemTemplate template = DataTemplate.GetInstance().GetItemTemplateById(ItemId);
            if (template != null)
            {
                name.text  = GameUtils.getString(template.getName());
                count.text = "x" + innerTemplate.getDropnum().ToString();
                m_Stars[0].transform.parent.gameObject.SetActive(true);
                m_Rune.SetActive(true);
                m_Icon.gameObject.SetActive(false);
                //星级
                for (int i = 0; i < m_Stars.Length; i++)
                {
                    if (template.getRune_quality() >= i + 1)
                    {
                        m_Stars[i].SetActive(true);
                    }
                    else
                    {
                        m_Stars[i].SetActive(false);
                    }
                }
                //设置普通符文的类型显示
                for (int i = 0; i < m_RuneCommonType.Length; i++)
                {
                    if (template.getRune_type() == i + 1)
                    {
                        m_RuneCommonType[i].SetActive(true);
                    }
                    else
                    {
                        m_RuneCommonType[i].SetActive(false);
                    }
                }
                //普通符文
                if (template.getRune_type() < 5)
                {
                    m_Rune_Common.SetActive(true);
                    m_Rune_Special.SetActive(false);
                    m_Rune_Common_icon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + template.getIcon_s());
                }
                else //特殊符文
                {
                    m_Rune_Common.SetActive(false);
                    m_Rune_Special.SetActive(true);
                    m_Rune_Special_icon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + template.getIcon_s());
                }
            }
            else
            {
                Debug.LogError(string.Format("找不到id{0}的为物品", ItemId));
            }
        }
        else if (ItemId >= 1403000001 && ItemId <= 1403999999) //英雄
        {
            HeroTemplate        template    = DataTemplate.GetInstance().GetHeroTemplateById(ItemId);
            ArtresourceTemplate artTemplate = DataTemplate.GetInstance().GetArtResourceTemplate(template.getArtresources());
            if (template != null)
            {
                m_Icon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + artTemplate.getHeadiconresource());
                name.text     = GameUtils.getString(template.getTitleID());
                count.text    = "x" + innerTemplate.getDropnum().ToString();
                m_Stars[0].transform.parent.gameObject.SetActive(true);
                m_Rune.SetActive(false);
                m_Icon.gameObject.SetActive(true);
                for (int i = 0; i < m_Stars.Length; i++)
                {
                    if (template.getQuality() >= i + 1)
                    {
                        m_Stars[i].SetActive(true);
                    }
                    else
                    {
                        m_Stars[i].SetActive(false);
                    }
                }
            }
            else
            {
                Debug.LogError(string.Format("找不到id{0}的为物品", ItemId));
            }
        }
    }
Exemplo n.º 15
0
    public void SetData(int tableID)
    {
        int    quality = -1;
        string iconStr = string.Empty;
        string name    = string.Empty;
        string hintTxt = string.Empty;
        string detail  = string.Empty;

        EM_OBJECT_CLASS eoc = GameUtils.GetObjectClassById(tableID);

        switch (eoc)
        {
        case EM_OBJECT_CLASS.EM_OBJECT_CLASS_RUNE:
            ItemTemplate runeItemT = DataTemplate.GetInstance().GetItemTemplateById(tableID);
            if (runeItemT == null)
            {
                LogManager.LogError("item表格中缺少物品id=" + tableID);
                return;
            }
            iconStr = runeItemT.getIcon_s();
            name    = GameUtils.getString(runeItemT.getName());
            int count = 0;
            if (ObjectSelf.GetInstance().TryGetItemCountById(EM_BAG_HASHTABLE_TYPE.EM_BAG_HASHTABLE_TYPE_COMMON, tableID, ref count))
            {
            }
            else
            {
                count = 0;
            }
            hintTxt = string.Format(GameUtils.getString("tongyong_daoju1"), count);
            detail  = GameUtils.getString(runeItemT.getDes());
            quality = runeItemT.getRune_quality();
            break;

        case EM_OBJECT_CLASS.EM_OBJECT_CLASS_COMMON:
            ItemTemplate itemT = DataTemplate.GetInstance().GetItemTemplateById(tableID);
            if (itemT == null)
            {
                LogManager.LogError("item表格中缺少物品id=" + tableID);
                return;
            }

            iconStr = itemT.getIcon_s();
            name    = GameUtils.getString(itemT.getName());

            int num = 0;
            if (ObjectSelf.GetInstance().TryGetItemCountById(EM_BAG_HASHTABLE_TYPE.EM_BAG_HASHTABLE_TYPE_COMMON, tableID, ref num))
            {
            }
            else
            {
                num = 0;
            }
            hintTxt = string.Format(GameUtils.getString("tongyong_daoju1"), num);
            detail  = GameUtils.getString(itemT.getDes());
            quality = itemT.getQuality();
            break;

        case EM_OBJECT_CLASS.EM_OBJECT_CLASS_MONSTER:
            MonsterTemplate monsterT = DataTemplate.GetInstance().m_MonsterTable.getTableData(tableID) as MonsterTemplate;
            if (monsterT == null)
            {
                LogManager.LogError("item表格中缺少物品id=" + tableID);
                return;
            }

            ArtresourceTemplate artMonster = DataTemplate.GetInstance().GetArtResourceTemplate(monsterT.getArtresources());
            if (artMonster == null)
            {
                LogManager.LogError("ArtResource时装表格中缺少物品id=" + monsterT.getArtresources());
                return;
            }

            iconStr = artMonster.getHeadiconresource();
            name    = GameUtils.getString(monsterT.getMonstername());
            hintTxt = string.Format("Lv{0}", monsterT.getMonsterlevel());
            detail  = GameUtils.getString(monsterT.getDescriptionID());
            quality = monsterT.getMonsterstar();
            break;

        case EM_OBJECT_CLASS.EM_OBJECT_CLASS_HERO:
            HeroTemplate heroT = DataTemplate.GetInstance().GetHeroTemplateById(tableID);
            if (heroT == null)
            {
                LogManager.LogError("hero表格中缺少物品id=" + tableID);
                return;
            }
            ArtresourceTemplate artHero = DataTemplate.GetInstance().GetArtResourceTemplate(heroT.getArtresources());
            if (artHero == null)
            {
                LogManager.LogError("ArtResource时装表格中缺少物品id=" + heroT.getArtresources());
                return;
            }

            iconStr = artHero.getHeadiconresource();
            //英雄的初始品质为HeroTemplate中的Quality;
            name = string.Format(GameUtils.GetHeroNameFontColor(heroT.getQuality()), GameUtils.getString(heroT.getNameID()));
            ObjectCard oc = ObjectSelf.GetInstance().HeroContainerBag.FindHero(tableID);
            hintTxt = string.Format("Lv{0}", oc == null ? 1 : oc.GetHeroData().Level);
            detail  = GameUtils.getString(heroT.getDescriptionID());
            break;

        case EM_OBJECT_CLASS.EM_OBJECT_CLASS_SKIN:
            ArtresourceTemplate artT = DataTemplate.GetInstance().GetArtResourceTemplate(tableID);
            if (artT == null)
            {
                LogManager.LogError("ArtResource时装表格中缺少物品id=" + tableID);
                return;
            }

            iconStr = string.Empty;
            name    = string.Empty;
            hintTxt = string.Empty;
            detail  = string.Empty;
            break;

        case EM_OBJECT_CLASS.EM_OBJECT_CLASS_RES:
            //资源类型点击无响应;
            iconStr = string.Empty;
            name    = string.Empty;
            hintTxt = string.Empty;
            detail  = string.Empty;
            break;

        default:
            LogManager.LogError("未处理的商城物品预览类型");
            break;
        }
        name = string.Format(GameUtils.GetHeroNameFontColor(quality), name);
        SetData(iconStr, name, hintTxt, detail);
    }
Exemplo n.º 16
0
    public void Data(object data)
    {
        InnerdropTemplate value = data as InnerdropTemplate;

        if (value == null)
        {
            return;
        }

        int itemid = value.getObjectid();
        int type   = itemid / 1000000;

        switch (type)
        {
        case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_RES:
            ResourceindexTemplate _temp_res = (ResourceindexTemplate)DataTemplate.GetInstance().m_ResourceindexTemplate.getTableData(itemid);
            if (_temp_res != null)
            {
                this.desc.text = GameUtils.getString(_temp_res.getName());
                string _tempIconNam_1 = _temp_res.getIcon3();
                this.icon.sprite  = UIResourceMgr.LoadSprite(common.defaultPath + _tempIconNam_1);
                this.numText.text = "x" + value.getDropnum();
            }
            break;

        case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_RUNE:     //符文
        {
            ItemTemplate itemTable = (ItemTemplate)DataTemplate.GetInstance().m_ItemTable.getTableData(value.getObjectid());
            this.desc.text = GameUtils.getString(itemTable.getName());
            this.icon.gameObject.SetActive(false);
            RuneIcon.SetActive(true);
            ShowRune(itemTable);
        }
        break;

        case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_COMMON:
        {
            ItemTemplate itemTable = (ItemTemplate)DataTemplate.GetInstance().m_ItemTable.getTableData(value.getObjectid());
            //UI_RewardsItemManage uifigt = item.GetComponent<UI_RewardsItemManage>();
            //uifigt.id = value.getObjectid();
            //uifigt.typeNum = 2;
            this.desc.text           = GameUtils.getString(itemTable.getName());
            this.icon.overrideSprite = UIResourceMgr.LoadSprite(common.defaultPath + itemTable.getIcon());
            this.numText.text        = "x" + value.getDropnum().ToString();
        }
        break;

        case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_HERO:
        {
            HeroTemplate hero = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(value.getObjectid());
            //UI_RewardsItemManage uihero = item.GetComponent<UI_RewardsItemManage>();
            //uihero.id = inner.getObjectid();
            //uihero.typeNum = 3;
            this.desc.text = GameUtils.getString(hero.getTitleID());        //"英雄";
            ArtresourceTemplate art = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(hero.getArtresources());
            this.icon.overrideSprite = UIResourceMgr.LoadSprite(common.defaultPath + art.getHeadiconresource());
            int star    = hero.getQuality();
            int maxStar = hero.getMaxQuality();
            this.star.Set(star, maxStar);
        }
        break;

        default:
            break;
        }
    }
Exemplo n.º 17
0
        public void SetGoodsItem(int iStageId)
        {
            for (int i = 0; i < objList.Count; i++)
            {
                Destroy(objList[i]);
            }
            objList.Clear();
            int count = mGoodsItemGroup.childCount;

            for (int i = 0; i < count; ++i)
            {
                Destroy(mGoodsItemGroup.GetChild(i).gameObject);
            }
            iStageID = iStageId;
            //StageTemplate stageinfo = (StageTemplate)DataTemplate.GetInstance().m_StageTable.getTableData(iStageID);
            StageTemplate stageinfo = StageModule.GetStageTemplateById(iStageID);
            ////if (list.ContainsKey(iStageId))
            //{
            //    //StageTemplate stageinfo = (StageTemplate)list[iStageID];
            //    if (stageinfo != null)
            //    {
            //        Dictionary<string, int> temp = stageinfo.getDisplaydrop();
            //        foreach (var info in temp)
            //        {
            //            GameObject gooditem = Instantiate(Resources.Load("UI/Prefabs/UI_Fight/UI_LGoodItem")) as GameObject;
            //            gooditem.transform.SetParent(mGoodsItemGroup, false);
            //            gooditem.AddComponent<UI_GoodItem>().InitFightAreaGoodItem(info.Key, info.Value);
            //        }
            //    }
            //}
            string displaydrop = stageinfo.m_displaydrop;

            if (displaydrop == "-1" || string.IsNullOrEmpty(displaydrop))
            {
            }
            else
            {
                string[] displaydropList = displaydrop.Split('#');
                if (displaydropList.Length == 0)
                {
                    return;
                }

                for (int i = 0; i < displaydropList.Length; i++)
                {
                    string[] itemList = displaydropList[i].Split('-');
                    switch (int.Parse(itemList[0]))
                    {
                    case 1:
                        int inner  = int.Parse(itemList[1]);
                        int itemid = inner / 1000000;
                        switch (itemid)
                        {
                        case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_RUNE:
                        {
                            GameObject item = Instantiate(Resources.Load("UI/Prefabs/UI_Fight/UI_LGoodRune"), transform.position, transform.rotation) as GameObject;
                            item.transform.SetParent(mGoodsItemGroup, false);
                            //item.transform.parent = mGoodsItemGroup;
                            //item.transform.localScale = Vector3.one;
                            //ItemTemplate itemTable = (ItemTemplate)DataTemplate.GetInstance().m_ItemTable.getTableData(inner);
                            ItemTemplate           itemTable = DataTemplate.GetInstance().GetItemTemplateById(inner);
                            UI_DropFightItemManage uifigt    = item.GetComponent <UI_DropFightItemManage>();
                            uifigt.typeNum      = 1;
                            uifigt.id           = inner;
                            uifigt.mIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + itemTable.getIcon());
                            uifigt.mIcon.SetNativeSize();
                            if (int.Parse(itemList[2]) == 0)
                            {
                                uifigt.mProbability.SetActive(true);
                                uifigt.mNumObj.SetActive(false);
                            }
                            else
                            {
                                uifigt.mProbability.SetActive(false);
                                uifigt.mNumObj.SetActive(true);
                                uifigt.mNum.text = "x" + itemList[3];
                            }

                            objList.Add(item);
                        }
                        break;

                        case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_COMMON:
                        {
                            GameObject item = Instantiate(Resources.Load("UI/Prefabs/UI_Fight/UI_LGoodItem"), transform.position, transform.rotation) as GameObject;
                            item.transform.SetParent(mGoodsItemGroup, false);
                            //item.transform.parent = mGoodsItemGroup;
                            //item.transform.localScale = Vector3.one;
                            //ItemTemplate itemTable = (ItemTemplate)DataTemplate.GetInstance().m_ItemTable.getTableData(inner);
                            ItemTemplate           itemTable = DataTemplate.GetInstance().GetItemTemplateById(inner);
                            UI_DropFightItemManage uifigt    = item.GetComponent <UI_DropFightItemManage>();
                            uifigt.id           = inner;
                            uifigt.typeNum      = 2;
                            uifigt.mIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + itemTable.getIcon());
                            uifigt.mIcon.SetNativeSize();
                            if (int.Parse(itemList[2]) == 0)
                            {
                                uifigt.mProbability.SetActive(true);
                                uifigt.mNumObj.SetActive(false);
                            }
                            else
                            {
                                uifigt.mProbability.SetActive(false);
                                uifigt.mNumObj.SetActive(true);
                                uifigt.mNum.text = "x" + itemList[3];
                            }
                            objList.Add(item);
                        }
                        break;

                        case (int)EM_OBJECT_CLASS.EM_OBJECT_CLASS_HERO:
                        {
                            GameObject item = Instantiate(Resources.Load("UI/Prefabs/UI_Fight/UI_LGoodHero"), transform.position, transform.rotation) as GameObject;
                            item.transform.SetParent(mGoodsItemGroup, false);
                            //item.transform.parent = mGoodsItemGroup;
                            //item.transform.localScale = Vector3.one;
                            //HeroTemplate hero = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(inner);
                            HeroTemplate           hero   = DataTemplate.GetInstance().GetHeroTemplateById(inner);
                            UI_DropFightItemManage uihero = item.GetComponent <UI_DropFightItemManage>();
                            uihero.id      = inner;
                            uihero.typeNum = 3;
                            //ArtresourceTemplate art = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(hero.getArtresources());
                            ArtresourceTemplate art = DataTemplate.GetInstance().GetArtResourceTemplate(hero.getArtresources());
                            uihero.mIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + art.getHeadiconresource());
                            uihero.mIcon.SetNativeSize();
                            int star    = hero.getQuality();
                            int maxStar = hero.getMaxQuality();

                            for (int j = 0; j < 5; j++)
                            {
                                uihero.starList[j].SetActive(j < star);
                                uihero.starList[j + 5].SetActive(j < maxStar);
                            }
                            //for (int j = 0; j < star; j++)
                            //{
                            //    uihero.starList[j].SetActive(true);
                            //}
                            //for (int k = star; k < 5; k++)
                            //{
                            //    uihero.starList[k].SetActive(false);
                            //}
                            if (int.Parse(itemList[2]) == 0)
                            {
                                uihero.mProbability.SetActive(true);
                            }
                            else
                            {
                                uihero.mProbability.SetActive(false);
                            }
                            objList.Add(item);
                        }
                        break;

                        default:
                            break;
                        }
                        break;

                    case 2:
                        GameObject items = Instantiate(Resources.Load("UI/Prefabs/UI_Fight/UI_LGoodItem"), transform.position, transform.rotation) as GameObject;
                        items.transform.SetParent(mGoodsItemGroup, false);
                        //items.transform.parent = mGoodsItemGroup;
                        //items.transform.localScale = Vector3.one;
                        UI_DropFightItemManage uiitems = items.GetComponent <UI_DropFightItemManage>();
                        uiitems.id           = 2;
                        uiitems.mIcon.sprite = UIResourceMgr.LoadSprite(common.defaultPath + itemList[1]);
                        uiitems.mIcon.SetNativeSize();
                        if (int.Parse(itemList[2]) == 0)
                        {
                            uiitems.mProbability.SetActive(true);
                            uiitems.mNumObj.SetActive(false);
                        }
                        else
                        {
                            uiitems.mProbability.SetActive(false);
                            uiitems.mNumObj.SetActive(true);
                            uiitems.mNum.text = "x" + itemList[3];
                        }
                        if (itemList[3] == "0")
                        {
                            uiitems.mTipsText = null;
                        }
                        else
                        {
                            uiitems.mTipsText = itemList[3];
                        }
                        objList.Add(items);

                        break;

                    default:
                        break;
                    }
                }
            }
        }
Exemplo n.º 18
0
    /// <summary>
    /// 填充数据 需要标识一下是哪个界面的item
    /// </summary>
    /// <param name="objHero">英雄卡牌信息</param>
    public void Initialize(HeroItemData objHero, ItemType type = ItemType.None)
    {
        if (type == ItemType.Empty)
        {
            parent.gameObject.SetActive(false);
            return;
        }
        else
        {
            parent.gameObject.SetActive(true);
        }
        this.objHero    = objHero.objcet;
        objHeroItemData = objHero;
        if (objHero.objcet != null)  //获取item
        {
            m_GetTran.gameObject.SetActive(true);
            m_NoGetTran.gameObject.SetActive(false);
            m_HeroLevelTran.gameObject.SetActive(true);
            //设置
            _HeroItem = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(objHero.objcet.GetHeroData().TableID);
            //卡牌图标
            _Artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(objHero.objcet.GetHeroData().GetHeroViewID());
            //等级显示
            m_heroLevel          = objHero.objcet.GetHeroData().Level;
            m_HeroLevelText.text = m_heroLevel.ToString();
            //设置是否上阵
            int mid = -1;
            m_ShangZhen.gameObject.SetActive(ObjectSelf.GetInstance().Teams.IsHeroInTeam(objHero.objcet.GetGuid(), ref mid));
            //设置战斗力
            m_FigthVigor.text = objHero.objcet.GetHeroData().FightVigor.ToString();
            //星级
            m_heroStar = this.objHero.GetHeroData().StarLevel;
            int maxStar = _HeroItem.getMaxQuality();
            for (int i = 0; i < 6; i++)
            {
                Image temp = selfTransform.FindChild("Parent/new/touxiang/Star_Image").GetChild(i).GetComponent <Image>();
                if (i < m_heroStar)
                {
                    temp.gameObject.SetActive(true);
                }
                else
                {
                    temp.gameObject.SetActive(false);
                }
            }
            //m_StarsHui.gameObject.SetActive(true);
            m_StarsHui.gameObject.SetActive(false);
        }
        else if (objHero.objcet == null)  //未获取
        {
            m_GetTran.gameObject.SetActive(false);
            m_NoGetTran.gameObject.SetActive(true);
            m_HeroLevelTran.gameObject.SetActive(false);
            m_ShangZhen.gameObject.SetActive(false);
            m_StarsHui.gameObject.SetActive(false);
            for (int i = 0; i < 6; i++)
            {
                selfTransform.FindChild("Parent/new/touxiang/Star_Image").GetChild(i).gameObject.SetActive(false);
            }
            //设置
            _HeroItem = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(objHero.heroTableID);
            //卡牌图标
            _Artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(_HeroItem.getArtresources());
            //碎片合成进度
            int fragmentCount = ObjectSelf.GetInstance().CommonItemContainer.GetFragmentCount(_HeroItem.GetID());
            int needCount     = _HeroItem.getSyntheticCount();
            //Debug.LogError("process:" + fragmentCount + "max:" + needCount);
            if (fragmentCount >= needCount)
            {
                m_GetHeroBt.gameObject.SetActive(false);
                m_RecruitBt.gameObject.SetActive(true);
            }
            else
            {
                m_GetHeroBt.gameObject.SetActive(true);
                m_RecruitBt.gameObject.SetActive(false);
            }
            m_CompoundText.text = fragmentCount + "/" + needCount;
            float _baifenbi = ((float)fragmentCount / needCount);
            m_RectFill.sizeDelta = new Vector2((_baifenbi > 1 ? 1 :_baifenbi) * m_FillInitWidth, m_RectFill.sizeDelta.y);
        }
        m_HeroIcon.sprite = UIResourceMgr.LoadSprite(url + _Artresourcedata.getHeadiconresource());
        //类型
        InterfaceControler.GetInst().ShowTypeIcon(_HeroItem, m_HeroTypeIcon, m_HeroTypeText);
        //品质
        if (objHeroItemData.objcet == null)
        {
            m_Qulit.sprite = InterfaceControler.GetInst().ReturnHeroQuailty(_HeroItem.getQuality());
        }
        else
        {
            m_Qulit.sprite = InterfaceControler.GetInst().ReturnHeroQuailty(this.objHero.GetHeroData().QualityLev);
        }
        //Debug.Log(m_heroLevel);
        //名称
        ChsTextTemplate chs = new ChsTextTemplate();

        chs           = (ChsTextTemplate)DataTemplate.GetInstance().m_ChsTextTable.getTableData(_HeroItem.getTitleID());
        m_heroName    = chs.languageMap["Chinese"];
        HeroName.text = m_heroName;
        if (objHeroItemData.objcet == null)
        {
            SetTextColorByQuilt(_HeroItem.getQuality());
        }
        else
        {
            SetTextColorByQuilt(this.objHero.GetHeroData().QualityLev);
        }
    }