|
@@ -31,7 +31,10 @@ namespace GFGGame
|
|
|
_ui.m_btnBack.onClick.Add(OnClickBtnBack);
|
|
|
_ui.m_listMenu.onClickItem.Add(OnClickListMenuItem);
|
|
|
}
|
|
|
-
|
|
|
+ protected override void AddEventListener()
|
|
|
+ {
|
|
|
+ EventAgent.AddEventListener(ConstMessage.SUIT_BOX_STATUS_CHANGED, UpdateSuitBoxStatus);
|
|
|
+ }
|
|
|
protected override void OnShown()
|
|
|
{
|
|
|
base.OnShown();
|
|
@@ -40,15 +43,16 @@ namespace GFGGame
|
|
|
_ui.m_listMenu.selectedIndex = 0;
|
|
|
UpdateSuitList();
|
|
|
|
|
|
- EventAgent.AddEventListener(ConstMessage.SUIT_BOX_STATUS_CHANGED, UpdateSuitBoxStatus);
|
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
|
{
|
|
|
base.OnHide();
|
|
|
+ }
|
|
|
+ protected override void RemoveEventListener()
|
|
|
+ {
|
|
|
EventAgent.RemoveEventListener(ConstMessage.SUIT_BOX_STATUS_CHANGED, UpdateSuitBoxStatus);
|
|
|
}
|
|
|
-
|
|
|
private void OnClickBtnBack()
|
|
|
{
|
|
|
ViewManager.GoBackFrom(ViewName.SUIT_SYNTHETIC_LIST_VIEW);
|
|
@@ -134,7 +138,7 @@ namespace GFGGame
|
|
|
ViewManager.Show(ViewName.CLOTHING_SYNTHETIC_VIEW, new object[] { suitId }, new object[] { ViewName.SUIT_SYNTHETIC_LIST_VIEW, this.viewData });
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+ UI_SuitListItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
|
private void UpdateSuitBoxStatus(EventContext eventContext)
|
|
@@ -149,6 +153,7 @@ namespace GFGGame
|
|
|
{
|
|
|
UpdateSuitBoxStatusView(listItem);
|
|
|
}
|
|
|
+ UI_SuitListItem.ProxyEnd();
|
|
|
}
|
|
|
}
|
|
|
|