|
@@ -16,6 +16,8 @@ namespace GFGGame
|
|
|
private UI_CardFosterUI _ui;
|
|
|
private UI_ComFosterBottom _comFosterBottom;
|
|
|
private ValueBarController _valueBarController;
|
|
|
+ private UI_ComCostCurrency _comLvConsumeGold;
|
|
|
+ private UI_ComCostCurrencyWithHas _comStarCousumeGold;
|
|
|
private CardData _cardData = new CardData();
|
|
|
private int _selectTab = 0;
|
|
|
|
|
@@ -99,6 +101,9 @@ namespace GFGGame
|
|
|
|
|
|
EventAgent.AddEventListener(ConstMessage.CARD_UP_SKILL, UpdateUpSkillView);
|
|
|
// EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, OnItemChangeListener);
|
|
|
+ _comLvConsumeGold = UI_ComCostCurrency.Proxy(_comFosterBottom.m_ComLvConsumeGold);
|
|
|
+ _comStarCousumeGold = UI_ComCostCurrencyWithHas.Proxy(_comFosterBottom.m_comStarCousumeGold);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -144,7 +149,7 @@ namespace GFGGame
|
|
|
private void UpdateCommon()
|
|
|
{
|
|
|
_comFosterBottom.m_listProperty.numItems = _cardData.scores.Count;
|
|
|
- _comFosterBottom.m_ComLvConsumeGold.m_txtCount.text = "0";
|
|
|
+ _comLvConsumeGold.m_txtNeed.text = "0";
|
|
|
|
|
|
}
|
|
|
private void UpdateCardRes()
|
|
@@ -215,8 +220,8 @@ namespace GFGGame
|
|
|
_comFosterBottom.m_txtCurLv.text = StringUtil.GetColorText(_showLv.ToString(), _showLv < maxLv ? "#D27869" : "#7D6956");
|
|
|
_comFosterBottom.m_txtMaxExp.text = cardLvCfg.needExp.ToString();
|
|
|
_comFosterBottom.m_txtCurExp.text = _showExp.ToString();
|
|
|
-
|
|
|
- _comFosterBottom.m_btnUpLv.grayed = _comFosterBottom.m_ComLvConsumeGold.m_txtCount.text == "0" ? true : false;
|
|
|
+ // = "0";
|
|
|
+ _comFosterBottom.m_btnUpLv.grayed = _comLvConsumeGold.m_txtNeed.text == "0" ? true : false;
|
|
|
|
|
|
_comFosterBottom.m_ctrlFullLv.selectedIndex = CardDataManager.isFullLv(_cardData.id, _cardData.lv, false) ? 1 : 0;
|
|
|
|
|
@@ -378,7 +383,7 @@ namespace GFGGame
|
|
|
hasExp += itemCfg.cardUpLvExp * itemsCount[i];
|
|
|
|
|
|
}
|
|
|
- _comFosterBottom.m_ComLvConsumeGold.m_txtCount.text = count.ToString();
|
|
|
+ _comLvConsumeGold.m_txtNeed.text = count.ToString();
|
|
|
|
|
|
int previewLv = 0;
|
|
|
int previewExp = 0;
|
|
@@ -403,7 +408,7 @@ namespace GFGGame
|
|
|
private void OnClickBtnUpLv()
|
|
|
{
|
|
|
int itemMoneyId = ItemCfgArray.Instance.GetCfg(upgradeCardItemsArr[0]).cardUpLvGoldArr[0];
|
|
|
- int itemMoneyNum = int.Parse(_comFosterBottom.m_ComLvConsumeGold.m_txtCount.text);
|
|
|
+ int itemMoneyNum = int.Parse(_comLvConsumeGold.m_txtNeed.text);
|
|
|
if (itemMoneyNum > ItemDataManager.GetItemNum(itemMoneyId))
|
|
|
{
|
|
|
ItemUtil.AddGold(itemMoneyNum - ItemDataManager.GetItemNum(itemMoneyId), UpLv);
|
|
@@ -471,7 +476,8 @@ namespace GFGGame
|
|
|
|
|
|
int costHas = ItemDataManager.GetItemNum(cardStarCfg.costID);
|
|
|
int costNeed = cardStarCfg.costNum;
|
|
|
- _comFosterBottom.m_comStarCousumeGold.m_txtCount.text = string.Format("{0}/{1}", costNeed, costHas);
|
|
|
+ _comStarCousumeGold.m_txtHas.text = costHas.ToString();
|
|
|
+ _comStarCousumeGold.m_txtNeed.text = costNeed.ToString();
|
|
|
|
|
|
_comFosterBottom.m_listStarConsume.data = cardStarCfg;
|
|
|
_comFosterBottom.m_listStarConsume.numItems = cardStarCfg.materiarsArr.Length;
|