|
@@ -52,10 +52,7 @@ namespace GFGGame
|
|
|
protected override void AddEventListener()
|
|
|
{
|
|
|
base.AddEventListener();
|
|
|
- EventAgent.AddEventListener(ConstMessage.BUY_RECHARGE_SUCCESS, () =>
|
|
|
- {
|
|
|
- _ui.m_list.numItems = RechargeCfgArray.Instance.dataArray.Length;
|
|
|
- });
|
|
|
+ EventAgent.AddEventListener(ConstMessage.BUY_RECHARGE_SUCCESS, UpdateList);
|
|
|
EventAgent.AddEventListener(ConstMessage.BUY_EXCHANGE_SUCCESS, UpdateExchangeList);
|
|
|
EventAgent.AddEventListener(ConstMessage.BUY_GIFT_SUCCESS, UpdateGiftBagList);
|
|
|
}
|
|
@@ -85,10 +82,7 @@ namespace GFGGame
|
|
|
protected override void RemoveEventListener()
|
|
|
{
|
|
|
base.RemoveEventListener();
|
|
|
- EventAgent.RemoveEventListener(ConstMessage.BUY_RECHARGE_SUCCESS, () =>
|
|
|
- {
|
|
|
- _ui.m_list.numItems = RechargeCfgArray.Instance.dataArray.Length;
|
|
|
- });
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.BUY_RECHARGE_SUCCESS, UpdateList);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.BUY_EXCHANGE_SUCCESS, UpdateExchangeList);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.BUY_GIFT_SUCCESS, UpdateGiftBagList);
|
|
|
}
|
|
@@ -96,6 +90,7 @@ namespace GFGGame
|
|
|
{
|
|
|
this.Hide();
|
|
|
}
|
|
|
+
|
|
|
private void OnComTabChange()
|
|
|
{
|
|
|
_ui.m_c1.selectedIndex = _ui.m_comTab.m_c1.selectedIndex;
|
|
@@ -107,6 +102,10 @@ namespace GFGGame
|
|
|
_ui.m_listGift.ScrollToView(0);
|
|
|
_ui.m_listExchange.ScrollToView(0);
|
|
|
}
|
|
|
+ private void UpdateList()
|
|
|
+ {
|
|
|
+ _ui.m_list.numItems = RechargeCfgArray.Instance.dataArray.Length;
|
|
|
+ }
|
|
|
private void UpdateGiftBagList()
|
|
|
{
|
|
|
_giftCfgs = RechargeDataManager.Instance.GetGiftBagCfgs();
|
|
@@ -140,7 +139,7 @@ namespace GFGGame
|
|
|
{
|
|
|
item.target.onClick.Add(() =>
|
|
|
{
|
|
|
- if(!AntiAddictionController.CheckAntiAddictionRecharge(itemData.price))
|
|
|
+ if (!AntiAddictionController.CheckAntiAddictionRecharge(itemData.price))
|
|
|
{
|
|
|
RechargeSProxy.ReqRecharge(itemData.id).Coroutine();
|
|
|
LogServerHelper.SendNodeLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
|