|
@@ -88,11 +88,7 @@ namespace GFGGame
|
|
});
|
|
});
|
|
|
|
|
|
EventAgent.AddEventListener(ConstMessage.CARD_UP_SKILL, UpSkill);
|
|
EventAgent.AddEventListener(ConstMessage.CARD_UP_SKILL, UpSkill);
|
|
- EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, () =>
|
|
|
|
- {
|
|
|
|
- UpdateUpLvView();
|
|
|
|
- UpdateUpStarView();
|
|
|
|
- });
|
|
|
|
|
|
+ EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, OnItemChangeListener);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -666,6 +662,17 @@ namespace GFGGame
|
|
this.UpdateUpSkillView();
|
|
this.UpdateUpSkillView();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ private void OnItemChangeListener()
|
|
|
|
+ {
|
|
|
|
+ CardLvlCfg cardLvCfg = CardCfgManager.GetCardLvCfgByRarityAndLv(_viewData.itemCfg.rarity, _showLv);
|
|
|
|
+ _comFosterBottom.m_listLvConsume.numItems = cardLvCfg.materiarsArr.Length;
|
|
|
|
+ if (CardDataManager.isFullStar(_viewData.id, _viewData.star, false))
|
|
|
|
+ {
|
|
|
|
+ CardStarCfg cardStarCfg = CardCfgManager.GetCardStarCfgByTypeAndRarityAndStar(_viewData.itemCfg.subType, _viewData.itemCfg.rarity, _viewData.star);
|
|
|
|
+ _comFosterBottom.m_listStarConsume.numItems = cardStarCfg.materiarsArr.Length;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
private void OnClickBtnBack()
|
|
private void OnClickBtnBack()
|
|
{
|
|
{
|
|
ViewManager.GoBackFrom(ViewName.CARD_FOSTER_VIEW);
|
|
ViewManager.GoBackFrom(ViewName.CARD_FOSTER_VIEW);
|
|
@@ -675,6 +682,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
base.OnHide();
|
|
base.OnHide();
|
|
EventAgent.RemoveEventListener(ConstMessage.MONEY_CHANGE, UpdateUpStarView);
|
|
EventAgent.RemoveEventListener(ConstMessage.MONEY_CHANGE, UpdateUpStarView);
|
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, OnItemChangeListener);
|
|
Timers.inst.Remove(OnTimedEvent);
|
|
Timers.inst.Remove(OnTimedEvent);
|
|
|
|
|
|
//_timer.Stop();
|
|
//_timer.Stop();
|