コード例 #1
0
 //初始话英雄搭配卡牌信息
 public void InitHeroMatchCardData(HeroTemplate carddata, ObjectCard card)
 {
     CardImage         = this.transform.FindChild("Icon_Img").GetComponent <Image>();
     CardNameText      = this.transform.FindChild("Name_txt").GetComponent <Text>();
     _Herodata         = carddata;
     _Artresourcedata  = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(carddata.getArtresources());
     CardImage.sprite  = UIResourceMgr.LoadSprite(common.defaultPath + _Artresourcedata.getHeadartresource());
     CardName          = GameUtils.getString(_Herodata.getTitleID());
     CardNameText.text = CardName;//名称
 }
コード例 #2
0
 /// <summary>
 ///显示英雄信息
 /// </summary>
 private void InitShowHeroData()
 {
     m_Name_txt.text  = GameUtils.getString(m_HeroData.getNameID());
     m_IconImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + m_ArtResData.getHeadartresource());
     for (int i = 5; i < 5 + m_HeroData.getQuality(); i++)
     {
         Image _img = m_SharParent.GetChild(i).GetComponent <Image>();
         _img.enabled = true;
     }
     InterfaceControler.AddLevelNum(m_HeroData.getMaxLevel().ToString(), m_LevelParent);
 }
コード例 #3
0
    //显示基础属性
    private void SetBaseInfo(int lv)
    {
        HeroName.text    = GameUtils.getString(_HeroItem.getTitleID());//名称
        m_heroLevel      = objHero.GetHeroData().Level;
        _Artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(objHero.GetHeroData().GetHeroViewID());
        Sprite _img = UIResourceMgr.LoadSprite(common.defaultPath + _Artresourcedata.getHeadartresource());

        m_heroStar = _HeroItem.getQuality();
        for (int i = 5; i < 10; ++i)//星级
        {
            Image temp = selfTransform.FindChild("Parent/bottomGrid/Star_Image").GetChild(i).GetComponent <Image>();
            temp.enabled = false;
        }
        for (int i = 5; i < 5 + m_heroStar; ++i)
        {
            Image temp = selfTransform.FindChild("Parent/bottomGrid/Star_Image").GetChild(i).GetComponent <Image>();
            temp.enabled = true;
        }
    }
コード例 #4
0
        //初始化战斗结束卡牌
        public void InitFightEnd(ObjectCard heroObject)
        {
            HeroObject = heroObject;
            _Herodata  = heroObject.GetHeroRow();
            Parent     = selfTransform.FindChild("Parent");
            int _ArtresourcedataID = HeroObject.GetHeroData().GetHeroViewID();

            CardImage      = Parent.FindChild("Icon_Img").GetComponent <Image>();
            CardNameText   = Parent.FindChild("Name_txt").GetComponent <Text>();
            _CardLevelText = Parent.FindChild("Level_txt");
            HeroEx         = Parent.FindChild("HeroExbar").GetComponent <Slider>();
            //HeroEx.value = heroObject.GetHeroData().Exp;
            CardName          = GameUtils.getString(_Herodata.getTitleID());
            CardNameText.text = CardName;//名称
            CardLevel         = heroObject.GetHeroData().Level;
            InterfaceControler.GetInst().AddLevelNum(CardLevel.ToString(), _CardLevelText, url);
            _Artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(HeroObject.GetHeroData().GetHeroViewID());
            CardImage.sprite = UIResourceMgr.LoadSprite(common.defaultPath + _Artresourcedata.getHeadartresource());

            InterfaceControler.GetInst().AddSharLevel(Parent.FindChild("Star_Image"), _Herodata);
            //SetBaseInfo(heroObject.GetHeroData().Level);
        }
コード例 #5
0
 /// <summary>
 /// 初始化英雄称号 头像
 /// </summary>
 private void InitShowHeroNameAndIcon()
 {
     m_Nametxt.text = GameUtils.getString(m_HeroData.getTitleID());
     m_ArtRes       = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(m_HeroData.getArtresources());
     m_Icon.sprite  = UIResourceMgr.LoadSprite(common.defaultPath + m_ArtRes.getHeadartresource());
 }