|
@@ -38,14 +38,17 @@ namespace GFGGame
|
|
|
_ui.m_compBanner.m_listTab.onClickItem.Add(OnClickListBannerItem);
|
|
|
_ui.m_compBanner.m_loaderPic.onClick.Add(OnClickBannerPic);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ protected override void AddEventListener()
|
|
|
+ {
|
|
|
EventAgent.AddEventListener(ConstMessage.SUIT_GUIDE_BOX_BONUS, () =>
|
|
|
- {
|
|
|
- _ui.m_listGuide.numItems = _listGuideDatas.Length;
|
|
|
- });
|
|
|
+ {
|
|
|
+ _ui.m_listGuide.numItems = _listGuideDatas.Length;
|
|
|
+ });
|
|
|
EventAgent.AddEventListener(ConstMessage.JUMP_TO_SOURCE, this.Hide);
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
protected override void OnShown()
|
|
|
{
|
|
|
base.OnShown();
|
|
@@ -62,7 +65,14 @@ namespace GFGGame
|
|
|
base.OnHide();
|
|
|
Timers.inst.Remove(SwitchBannerPic);
|
|
|
}
|
|
|
-
|
|
|
+ protected override void RemoveEventListener()
|
|
|
+ {
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.SUIT_GUIDE_BOX_BONUS, () =>
|
|
|
+ {
|
|
|
+ _ui.m_listGuide.numItems = _listGuideDatas.Length;
|
|
|
+ });
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.JUMP_TO_SOURCE, this.Hide);
|
|
|
+ }
|
|
|
private void OnClickBtnBack()
|
|
|
{
|
|
|
// this.Hide();
|
|
@@ -74,6 +84,7 @@ namespace GFGGame
|
|
|
UI_ButtonBannerPage listItem = UI_ButtonBannerPage.Proxy(item);
|
|
|
int id = _listBannerDatas[index];
|
|
|
listItem.target.data = id;
|
|
|
+ UI_ButtonBannerPage.ProxyEnd();
|
|
|
}
|
|
|
|
|
|
private void OnClickBannerPic()
|
|
@@ -96,6 +107,7 @@ namespace GFGGame
|
|
|
listItem.target.data = id;
|
|
|
bool red = actions[index]();
|
|
|
RedDotController.Instance.SetComRedDot(listItem.target, red, "", -20);
|
|
|
+ UI_CompGuideItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
|
private void OnClickListBannerItem(EventContext context)
|
|
@@ -141,6 +153,7 @@ namespace GFGGame
|
|
|
GetGuideProgress(id, out haveCount, out totalCount);
|
|
|
decimal value = Math.Floor((decimal)100 * haveCount / totalCount);
|
|
|
listItem.m_txtProgress.text = value + "%";
|
|
|
+ UI_CompGuideItem.ProxyEnd();
|
|
|
}
|
|
|
}
|
|
|
|