|
@@ -12,6 +12,7 @@ namespace GFGGame
|
|
|
private UI_StoreMonthUI _ui;
|
|
|
private ValueBarController _valueBarController;
|
|
|
private List<ShopCfg> _shopCfgs;
|
|
|
+ private int menu2;
|
|
|
|
|
|
public override void Dispose()
|
|
|
{
|
|
@@ -48,6 +49,7 @@ namespace GFGGame
|
|
|
{
|
|
|
base.AddEventListener();
|
|
|
EventAgent.AddEventListener(ConstMessage.SHOP_BUY, UpdateView);
|
|
|
+ EventAgent.AddEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
|
|
|
|
|
|
}
|
|
|
protected override void OnShown()
|
|
@@ -56,6 +58,7 @@ namespace GFGGame
|
|
|
|
|
|
_valueBarController.OnShown();
|
|
|
UpdateView();
|
|
|
+ UpdateRedDot();
|
|
|
}
|
|
|
|
|
|
|
|
@@ -68,6 +71,7 @@ namespace GFGGame
|
|
|
{
|
|
|
base.RemoveEventListener();
|
|
|
EventAgent.RemoveEventListener(ConstMessage.SHOP_BUY, UpdateView);
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
|
|
|
}
|
|
|
private void OnBtnBlackRewardClick()
|
|
|
{
|
|
@@ -75,7 +79,7 @@ namespace GFGGame
|
|
|
}
|
|
|
private void UpdateView()
|
|
|
{
|
|
|
- int menu2 = (int)this.viewData;
|
|
|
+ menu2 = (int)this.viewData;
|
|
|
_shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_MONTH_CARD, menu2);
|
|
|
_shopCfgs = ShopDataManager.Instance.RemoveNotOpenCfg(_shopCfgs);
|
|
|
_shopCfgs = ShopDataManager.Instance.SortShopGoodsCfgs(_shopCfgs);
|
|
@@ -91,7 +95,7 @@ namespace GFGGame
|
|
|
MonthlyCardCfg monthCfg = null;
|
|
|
switch (menu2)
|
|
|
{
|
|
|
- case ConstStoreSubId.STORE_MONTH_GLOAD_CARD:
|
|
|
+ case ConstStoreSubId.STORE_MONTH_GOLD_CARD:
|
|
|
iconUrl = "ui://Store/MonthCard_Icon";
|
|
|
monthCfg = MonthlyCardCfgArray.Instance.GetCfg(MonthCardType.Gold);
|
|
|
isFirstBuy = GameGlobal.myNumericComponent.GetAsInt(NumericType.MonthCardGoldFirstBuy) <= 0;
|
|
@@ -188,5 +192,10 @@ namespace GFGGame
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private void UpdateRedDot()
|
|
|
+ {
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnGet, menu2 == ConstStoreSubId.STORE_MONTH_GOLD_CARD && RedDotDataManager.Instance.GetGoldCardRewardRed() || menu2 == ConstStoreSubId.STORE_MONTH_BLACK_CARD && RedDotDataManager.Instance.GetBlackCardRewardRed());
|
|
|
+ }
|
|
|
}
|
|
|
}
|