Ejemplo n.º 1
0
    /// <summary>
    /// 刷新上阵卡牌信息
    /// </summary>
    /// <param name="item"></param>
    void UpdateCardFightGrid(UIGridItem item)
    {
        if (item == null || item.oData == null || item.mScripts == null)
        {
            return;
        }
        CardDataMsg info = item.oData as CardDataMsg;

        UILabel   nofight   = item.mScripts[0] as UILabel;
        UILabel   fight     = item.mScripts[1] as UILabel;
        UILabel   cardName  = item.mScripts[2] as UILabel;
        UITexture head      = item.mScripts[3] as UITexture;
        UILabel   skillType = item.mScripts[4] as UILabel;

        nofight.gameObject.SetActive(info.configId < 4);
        fight.gameObject.SetActive(info.configId > 4);
        item.name = "fight" + item.miCurIndex;
        if (fight.gameObject.activeSelf)
        {
            TD_Card card = CardConfig.GetItem(info.configId);
            cardName.text = card.name;
            LoadSprite.LoaderCard(head, card.res);
            skillType.text = UtilTools.GetSKillTypeName((int)card.type);
        }
    }
Ejemplo n.º 2
0
    public void ShowCardInfo(TD_Card info)
    {
        UITexture   head      = item.mScripts[0] as UITexture;
        SymbolLabel skill1Des = item.mScripts[1] as SymbolLabel;
        SymbolLabel skill2Des = item.mScripts[2] as SymbolLabel;
        UILabel     cardName  = item.mScripts[3] as UILabel;
        UILabel     skillType = item.mScripts[4] as UILabel;
        UISprite    isFight   = item.mScripts[5] as UISprite;

        LoadSprite.LoaderCard(head, info.res);
        isFight.gameObject.SetActive(false);
        cardName.text  = info.name;
        skillType.text = UtilTools.GetSKillTypeName((int)info.type);
        skill1Des.text = "4444444{01}4444";
        skill2Des.text = "4444444{01}4444";
        this.transform.DOLocalMove(new Vector3(-220, 0, 0), 0.1f, false);
        this.transform.DOScale(Vector3.one * 2, 0.1f);
    }
Ejemplo n.º 3
0
    /// <summary>
    /// 刷新卡牌信息
    /// </summary>
    /// <param name="item"></param>
    void UpdateCardGrid(UIGridItem item)
    {
        if (item == null || item.oData == null || item.mScripts == null)
        {
            return;
        }
        TD_Card     info      = item.oData as TD_Card;
        UITexture   head      = item.mScripts[0] as UITexture;
        SymbolLabel skill1Des = item.mScripts[1] as SymbolLabel;
        SymbolLabel skill2Des = item.mScripts[2] as SymbolLabel;
        UILabel     cardName  = item.mScripts[3] as UILabel;
        UILabel     skillType = item.mScripts[4] as UILabel;
        UISprite    isFight   = item.mScripts[5] as UISprite;

        LoadSprite.LoaderCard(head, info.res);
        item.onClick = ShowCardInfoPanel;
        isFight.gameObject.SetActive(info.isFight == 1);
        cardName.text  = info.name;
        skillType.text = UtilTools.GetSKillTypeName((int)info.type);
        skill1Des.text = "4444444{01}4444";
        skill2Des.text = "4444444{01}4444";
    }