|
@@ -45,11 +45,6 @@ namespace GFGGame
|
|
_ui.m_iconSuidAdd.onClick.Add(OnClickIconSuidAdd);
|
|
_ui.m_iconSuidAdd.onClick.Add(OnClickIconSuidAdd);
|
|
}
|
|
}
|
|
|
|
|
|
- protected override void AddEventListener()
|
|
|
|
- {
|
|
|
|
- base.AddEventListener();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
protected override void OnShown()
|
|
protected override void OnShown()
|
|
{
|
|
{
|
|
base.OnShown();
|
|
base.OnShown();
|
|
@@ -63,10 +58,15 @@ namespace GFGGame
|
|
_storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(_activityFightCfg.type, _activityFightCfg.subType, _activityCfg.params3Arr[0]);
|
|
_storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(_activityFightCfg.type, _activityFightCfg.subType, _activityCfg.params3Arr[0]);
|
|
_ui.m_list.numItems = _storyLevelCfgs.Count;
|
|
_ui.m_list.numItems = _storyLevelCfgs.Count;
|
|
UpdateItem();
|
|
UpdateItem();
|
|
|
|
+ RefreshTxtFreeNum();
|
|
|
|
+ _ui.m_txtTitle.SetVar("name", _activityCfg.themeName).FlushVars();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void RefreshTxtFreeNum()
|
|
|
|
+ {
|
|
RoleLimitData limitData = RoleLimitDataManager.GetLimitData(_activityFightCfg.limit);
|
|
RoleLimitData limitData = RoleLimitDataManager.GetLimitData(_activityFightCfg.limit);
|
|
int time = limitData.TotalPlayMax - limitData.PlayTimes;
|
|
int time = limitData.TotalPlayMax - limitData.PlayTimes;
|
|
_ui.m_txtFreeNum.text = time + "/" + limitData.TotalPlayMax;
|
|
_ui.m_txtFreeNum.text = time + "/" + limitData.TotalPlayMax;
|
|
- _ui.m_txtTitle.SetVar("name", _activityCfg.themeName).FlushVars();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
protected override void OnHide()
|
|
@@ -74,9 +74,16 @@ namespace GFGGame
|
|
base.OnHide();
|
|
base.OnHide();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ protected override void AddEventListener()
|
|
|
|
+ {
|
|
|
|
+ base.AddEventListener();
|
|
|
|
+ EventAgent.AddEventListener(ConstMessage.FIGHT_QUICKLY, RefreshTxtFreeNum);
|
|
|
|
+ }
|
|
|
|
+
|
|
protected override void RemoveEventListener()
|
|
protected override void RemoveEventListener()
|
|
{
|
|
{
|
|
base.RemoveEventListener();
|
|
base.RemoveEventListener();
|
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.FIGHT_QUICKLY, RefreshTxtFreeNum);
|
|
}
|
|
}
|
|
|
|
|
|
private void OnClickBtnBack()
|
|
private void OnClickBtnBack()
|