|
@@ -42,7 +42,11 @@ namespace GFGGame
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ protected override void AddEventListener()
|
|
|
|
+ {
|
|
|
|
+ EventAgent.AddEventListener(ConstMessage.BUY_STUDIO_PLAY_TIMES, UpdateView);
|
|
|
|
+ EventAgent.AddEventListener(ConstMessage.NOTICE_STUDIO_PLAY_TIMES, UpdateView);
|
|
|
|
+ }
|
|
protected override void OnShown()
|
|
protected override void OnShown()
|
|
{
|
|
{
|
|
base.OnShown();
|
|
base.OnShown();
|
|
@@ -51,8 +55,7 @@ namespace GFGGame
|
|
|
|
|
|
UpdateView();
|
|
UpdateView();
|
|
Timers.inst.Add(1, 0, UpdateShowTime);
|
|
Timers.inst.Add(1, 0, UpdateShowTime);
|
|
- EventAgent.AddEventListener(ConstMessage.BUY_STUDIO_PLAY_TIMES, UpdateView);
|
|
|
|
- EventAgent.AddEventListener(ConstMessage.NOTICE_STUDIO_PLAY_TIMES, UpdateView);
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
protected override void OnHide()
|
|
@@ -63,6 +66,10 @@ namespace GFGGame
|
|
storyLevelCfgs = null;
|
|
storyLevelCfgs = null;
|
|
studioData = null;
|
|
studioData = null;
|
|
Timers.inst.Remove(UpdateShowTime);
|
|
Timers.inst.Remove(UpdateShowTime);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ protected override void RemoveEventListener()
|
|
|
|
+ {
|
|
EventAgent.RemoveEventListener(ConstMessage.BUY_STUDIO_PLAY_TIMES, UpdateView);
|
|
EventAgent.RemoveEventListener(ConstMessage.BUY_STUDIO_PLAY_TIMES, UpdateView);
|
|
EventAgent.RemoveEventListener(ConstMessage.NOTICE_STUDIO_PLAY_TIMES, UpdateView);
|
|
EventAgent.RemoveEventListener(ConstMessage.NOTICE_STUDIO_PLAY_TIMES, UpdateView);
|
|
}
|
|
}
|
|
@@ -88,6 +95,7 @@ namespace GFGGame
|
|
item.m_txtTitle.text = canFight ? storyLevelCfgs[index].name : content;
|
|
item.m_txtTitle.text = canFight ? storyLevelCfgs[index].name : content;
|
|
if (canFight) curIndex = index;
|
|
if (canFight) curIndex = index;
|
|
item.target.data = index;
|
|
item.target.data = index;
|
|
|
|
+ UI_ListItem.ProxyEnd();
|
|
}
|
|
}
|
|
private void OnCliclListItem(EventContext context)
|
|
private void OnCliclListItem(EventContext context)
|
|
{
|
|
{
|
|
@@ -103,6 +111,7 @@ namespace GFGGame
|
|
StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _ui.m_listProperty.selectedIndex;
|
|
StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _ui.m_listProperty.selectedIndex;
|
|
StudioDataManager.Instance.TYPE_SELECT_INDEX = _ui.m_c1.selectedIndex;
|
|
StudioDataManager.Instance.TYPE_SELECT_INDEX = _ui.m_c1.selectedIndex;
|
|
InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishStoryLevel);
|
|
InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishStoryLevel);
|
|
|
|
+ UI_ListItem.ProxyEnd();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|