Ejemplo n.º 1
0
    public void UpdateUI(LocalSave.CardOne data, int index)
    {
        this.mData = data;
        string typeName = this.mData.GetTypeName(index);

        if (this.mData.data.BaseAttributes[0].Contains("Global_HarvestLevel"))
        {
            this.Text_Value.text = typeName;
        }
        else
        {
            string   currentAttribute = this.mData.GetCurrentAttribute(index);
            string   str3             = (Goods_goods.GetGoodData(this.mData.data.BaseAttributes[index]).value <= 0L) ? "-" : "+";
            object[] args             = new object[] { typeName, str3, currentAttribute };
            this.Text_Value.text = Utils.FormatString("{0} {1} {2}", args);
        }
    }
Ejemplo n.º 2
0
    private int GetCardIndex(LocalSave.CardOne one)
    {
        int num   = 0;
        int count = this.cards.Count;

        while (num < count)
        {
            if (this.cards[num].CardID == one.CardID)
            {
                return(num);
            }
            num++;
        }
        object[] args = new object[] { one.CardID };
        SdkManager.Bugly_Report("CardUICtrl", Utils.FormatString("GetCardIndex[{0}] is not found.", args));
        return(0);
    }
Ejemplo n.º 3
0
    protected override void OnOpen()
    {
        IProxy proxy = Facade.Instance.RetrieveProxy("CardLevelUpProxy");

        if (proxy != null)
        {
            this.onEventClose = proxy.Event_Para0;
            this.mData        = proxy.Data as LocalSave.CardOne;
            object[] args = new object[] { this.mData.CardID };
            this.Text_CardName.text = GameLogic.Hold.Language.GetLanguageByTID(Utils.FormatString("宝物名称{0}", args), Array.Empty <object>());
            this.Text_CardName.transform.localPosition = Vector3.zero;
            this.mCloseCtrl.OnClose = new Action(this.OnClickClose);
            if ((this.mData.CardID == LocalSave.Instance.Card_GetHarvestID()) && (LocalSave.Instance.Card_GetHarvestLevel() == 1))
            {
                LocalSave.Instance.mHarvest.Unlock();
                CReqItemPacket itemPacket = NetManager.GetItemPacket(null, false);
                itemPacket.m_nPacketType = 0x11;
                if (< > f__am$cache0 == null)
                {
Ejemplo n.º 4
0
    private void InitUI()
    {
        GameLogic.Hold.Guide.mCard.GoNext(1, this.Button_Upgrade.transform as RectTransform);
        this.OnClickBG();
        this.bInitOver = false;
        this.ResetRandom();
        this.randomcard = null;
        this.randomobj.gameObject.SetActive(false);
        this.mCardList.Clear();
        this.UpdateButton();
        this.mPool.Collect <CardOneCtrl>();
        this.cards = LocalSave.Instance.GetCardsList();
        this.cards.Sort(new Comparison <LocalSave.CardOne>(this.Sort));
        int num = MathDxx.Clamp(this.cards.Count, 0, 0x10);

        TweenExtensions.Kill(this.s, false);
        this.s = DOTween.Sequence();
        for (int i = 0; i < num; i++)
        {
        public List <string> GetAttributes(LocalSave.CardOne one)
        {
            List <string> list     = new List <string>();
            Skill_slotout beanById = base.GetBeanById(one.CardID);

            if (beanById != null)
            {
                if (beanById.BaseAttributes.Length != beanById.AddAttributes.Length)
                {
                    object[] args = new object[] { one.CardID };
                    SdkManager.Bugly_Report("Skill_slotoutModel_Extra", Utils.FormatString("GetAttributes[{0}] attributes is error.", args));
                    return(list);
                }
                int index  = 0;
                int length = beanById.BaseAttributes.Length;
                while (index < length)
                {
                    string str2;
                    string str = beanById.BaseAttributes[index];
                    float  num = beanById.AddAttributes[index];
                    Goods_goods.GoodData goodData = Goods_goods.GetGoodData(str);
                    if (goodData.percent)
                    {
                        num  = goodData.value + (((one.level - 1) * num) * 100f);
                        num /= 100f;
                        str2 = num.ToString();
                    }
                    else
                    {
                        str2 = (goodData.value + ((one.level - 1) * ((long)num))).ToString();
                    }
                    object[] args = new object[] { goodData.goodType, goodData.GetSymbolString(), str2 };
                    str = Utils.FormatString("{0} {1} {2}", args);
                    list.Add(str);
                    index++;
                }
            }
            return(list);
        }
Ejemplo n.º 6
0
    public void UpdateUI(LocalSave.CardOne data, int index)
    {
        this.mData = data;
        string typeName = this.mData.GetTypeName(index);

        this.Text_Name.text = typeName;
        if (this.mData.data.BaseAttributes[0].Contains("Global_HarvestLevel"))
        {
            this.Image_Arrow.gameObject.SetActive(false);
            this.Text_Before.text = string.Empty;
            this.Text_After.text  = string.Empty;
        }
        else
        {
            this.Image_Arrow.gameObject.SetActive(true);
            string   currentAttribute = this.mData.GetCurrentAttribute(index);
            string   nextAttribute    = this.mData.GetNextAttribute(index);
            object[] args             = new object[] { currentAttribute };
            this.Text_Before.text = Utils.FormatString("+{0}", args);
            object[] objArray2 = new object[] { nextAttribute };
            this.Text_After.text = Utils.FormatString("+{0}", objArray2);
        }
    }
Ejemplo n.º 7
0
 public void InitCard(LocalSave.CardOne carddata)
 {
     this.carddata = carddata;
     this.UpdateUI();
 }