Exemple #1
0
    public virtual void Initiate(CardInfo_Base cardInfo, CardShowMode cardShowMode, ClientPlayer clientPlayer = null)
    {
        ClientPlayer = clientPlayer;
        CardInfo     = cardInfo.Clone();
        SetCardShowMode(cardShowMode);
        transform.rotation = Quaternion.Euler(0, 0, 0);
        transform.Rotate(Vector3.up, 180);
        Usable = false;
        if (DragComponent)
        {
            DragComponent.enabled = true;
        }
        BoxCollider.enabled = true;
        M_Metal             = CardInfo.BaseInfo.Metal;
        M_Energy            = CardInfo.BaseInfo.Energy;
        M_Coin = CardInfo.BaseInfo.Coin;
        string cur_Language = LanguageManager.Instance ? LanguageManager.Instance.GetCurrentLanguage() : "zh";

        M_Name = CardInfo.BaseInfo.CardNames[cur_Language] + (CardInfo.BaseInfo.IsTemp ? "*" : "");
        M_Desc = CardInfo.GetCardDescShow();

        CardDescComponent.SetTempCard(false);
        ChangeCardPicture(CardInfo.BaseInfo.PictureID);
        CardDescComponent?.SetCardTypeText(CardInfo.GetCardTypeDesc());
        SetBlockCountValue(0, true);
        SetBlockCountMaxValue(CardInfo.BaseInfo.LimitNum, true);
        SetBannerType(CardNoticeComponent.BannerTypes.None);
        SetArrowType(CardNoticeComponent.ArrowTypes.None);
        SetStarNumber(CardInfo.UpgradeInfo.CardLevel, CardInfo.UpgradeInfo.CardLevelMax);
        RefreshCardAllColors();
    }
Exemple #2
0
    public void RefreshCardTextLanguage()
    {
        string cur_Language = LanguageManager.Instance.GetCurrentLanguage();

        M_Name = CardInfo.BaseInfo.CardNames[cur_Language] + (CardInfo.BaseInfo.IsTemp ? "*" : "");
        M_Desc = CardInfo.GetCardDescShow();
        CardDescComponent?.SetCardTypeText(CardInfo.GetCardTypeDesc());
    }