private void RefreshTextExpAndTrust() { int mixTotalExp; int mixTrustExp; int mixTotalAwakeLv; ConceptCardManager.CalcTotalExpTrust(this.CCManager.SelectedConceptCardData, this.mSelectedMaterials, out mixTotalExp, out mixTrustExp, out mixTotalAwakeLv); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TextExp, (UnityEngine.Object)null)) { this.TextExp.set_text(mixTotalExp.ToString()); } if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TextTrust, (UnityEngine.Object)null)) { return; } this.TextTrust.set_text(ConceptCardManager.ParseTrustFormat(mixTrustExp)); }
public static void SubstituteTrustFormat(ConceptCardData card, Text txt, int trust, bool notChangeColor = false) { if (UnityEngine.Object.op_Equality((UnityEngine.Object)txt, (UnityEngine.Object)null) || card == null) { return; } string trustFormat = ConceptCardManager.ParseTrustFormat(trust); txt.set_text(trustFormat); if (notChangeColor) { return; } if (trust >= (int)MonoSingleton <GameManager> .Instance.MasterParam.FixParam.CardTrustMax && card.GetReward() != null) { ((Graphic)txt).set_color(Color.get_red()); } else { ((Graphic)txt).set_color(Color.get_white()); } }
public void RefreshParam(int rarity, int baseExp, int baseTrust, int lvCap, bool enhance) { int lv1; int nextExp1; int expTbl1; ConceptCardUtility.GetExpParameter(rarity, baseExp, (int)this.mConceptCardData.CurrentLvCap, out lv1, out nextExp1, out expTbl1); bool flag1 = enhance && this.mAddExp != 0 && nextExp1 != 0; bool flag2 = enhance && this.mAddTrust != 0 && baseTrust != (int)MonoSingleton <GameManager> .Instance.MasterParam.FixParam.CardTrustMax; bool flag3 = enhance && this.mAddAwakeLv != 0; this.SetText(this.mCardLvText, lv1.ToString()); this.SetText(this.mCardLvCapText, lvCap.ToString()); this.SetText(this.mCardNextExpText, nextExp1.ToString()); ConceptCardManager.SubstituteTrustFormat(this.mConceptCardData, this.mCardTrustText, baseTrust, false); this.mCardLvSlider.set_value((float)(1.0 - (double)nextExp1 / (double)expTbl1)); this.mCardPredictLvArrow.SetActive(false); this.mCardPredictLvSlash.SetActive(false); ((Component)this.mCardPredictLvWhiteText).get_gameObject().SetActive(false); ((Component)this.mCardPredictLvGreenText).get_gameObject().SetActive(false); ((Component)this.mCardPredictLvCapWhiteText).get_gameObject().SetActive(false); ((Component)this.mCardPredictLvCapGreenText).get_gameObject().SetActive(false); this.mCardLvAnimator.Play(this.ANIM_NAME_LV_TEXT_STYLE_DEFAULT); if (flag1 || flag3) { int lv2; int nextExp2; int expTbl2; ConceptCardUtility.GetExpParameter(rarity, baseExp + this.mAddExp, lvCap + this.mAddAwakeLv, out lv2, out nextExp2, out expTbl2); this.SetText(this.mCardNextPredictExpText, nextExp2.ToString()); this.mCardPredictLvSlider.set_value(lv1 >= lv2 ? (float)(1.0 - (double)nextExp2 / (double)expTbl2) : 1f); this.mCardPredictLvArrow.SetActive(true); this.mCardPredictLvSlash.SetActive(true); this.mCardLvAnimator.Play(this.ANIM_NAME_LV_TEXT_STYLE_ENHANCE); if (lv1 < lv2) { ((Component)this.mCardPredictLvGreenText).get_gameObject().SetActive(true); this.SetText(this.mCardPredictLvGreenText, lv2.ToString()); } else { ((Component)this.mCardPredictLvWhiteText).get_gameObject().SetActive(true); this.SetText(this.mCardPredictLvWhiteText, lv2.ToString()); } if (flag3) { ((Component)this.mCardPredictLvCapGreenText).get_gameObject().SetActive(true); this.SetText(this.mCardPredictLvCapGreenText, (lvCap + this.mAddAwakeLv).ToString()); } else { ((Component)this.mCardPredictLvCapWhiteText).get_gameObject().SetActive(true); this.SetText(this.mCardPredictLvCapWhiteText, (lvCap + this.mAddAwakeLv).ToString()); } } if (flag2) { this.SetText(this.mCardPredictTrustText, ConceptCardManager.ParseTrustFormat(baseTrust + this.mAddTrust)); } this.RefreshAwakeIcons(enhance); ((Component)this.mCardNextExpText).get_gameObject().SetActive(!flag1); ((Component)this.mCardNextPredictExpText).get_gameObject().SetActive(flag1); ((Component)this.mCardPredictLvSlider).get_gameObject().SetActive(flag1); ((Component)this.mCardTrustText).get_gameObject().SetActive(!flag2); ((Component)this.mCardPredictTrustText).get_gameObject().SetActive(flag2); }