|
@@ -47,6 +47,8 @@ namespace GFGGame
|
|
|
base.AddEventListener();
|
|
|
EventAgent.AddEventListener(ConstMessage.STORY_LEVEL_CHANGE, UpdateView);
|
|
|
EventAgent.AddEventListener(ConstMessage.FILLING_CHANGE_CHAPTER, UpdateView);
|
|
|
+ EventAgent.AddEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
|
|
|
+
|
|
|
}
|
|
|
protected override void OnShown()
|
|
|
{
|
|
@@ -65,15 +67,18 @@ namespace GFGGame
|
|
|
base.RemoveEventListener();
|
|
|
EventAgent.RemoveEventListener(ConstMessage.STORY_LEVEL_CHANGE, UpdateView);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.FILLING_CHANGE_CHAPTER, UpdateView);
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
|
|
|
|
|
|
}
|
|
|
|
|
|
private void UpdateView()
|
|
|
{
|
|
|
+ StudioData studioData = StudioDataManager.Instance.GetStudioDataById(StudioDataManager.Instance.filingChapterId);
|
|
|
|
|
|
_filingCfg = StudioCfgArray.Instance.GetCfg(StudioDataManager.Instance.filingChapterId);
|
|
|
_ui.m_txtTitle.SetVar("name", _filingCfg.name).FlushVars();
|
|
|
_ui.m_loaNpc.url = ResPathUtil.GetNpcPicFPath(_filingCfg.res);
|
|
|
+ _ui.m_txtNum.text = string.Format("剩余次数:{0}/{1}", studioData.TotalPlayTimes - studioData.PlayTimes, _filingCfg.num);
|
|
|
|
|
|
SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(_filingCfg.suitId);
|
|
|
_ui.m_txtSuitName.text = suitCfg.name;
|
|
@@ -83,6 +88,8 @@ namespace GFGGame
|
|
|
|
|
|
_storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(_filingCfg.type, _filingCfg.subType, StudioDataManager.Instance.filingChapterId);
|
|
|
_ui.m_list.numItems = _storyLevelCfgs.Count;
|
|
|
+
|
|
|
+ UpdateRedDot();
|
|
|
}
|
|
|
|
|
|
private void RenderListItem(int index, GObject obj)
|
|
@@ -108,14 +115,14 @@ namespace GFGGame
|
|
|
}
|
|
|
|
|
|
MainStoryDataManager.currentLevelCfgId = storyLevelCfg.id;
|
|
|
- if (!string.IsNullOrEmpty(storyLevelCfg.storyStartID))
|
|
|
- {
|
|
|
- StoryController.ShowFilingStoryDialog(storyLevelCfg);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishFilingStoryLevel);
|
|
|
- }
|
|
|
+ // if (!string.IsNullOrEmpty(storyLevelCfg.storyStartID))
|
|
|
+ // {
|
|
|
+ // StoryController.ShowFilingStoryDialog(storyLevelCfg);
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishFilingStoryLevel);
|
|
|
+ // }
|
|
|
}
|
|
|
private void OnBtnChangeClick()
|
|
|
{
|
|
@@ -140,5 +147,10 @@ namespace GFGGame
|
|
|
}
|
|
|
ViewManager.Show<ClothingSyntheticView>(new object[] { _filingCfg.suitId }, new object[] { typeof(StudioFilingView).FullName, this.viewData }, true);
|
|
|
}
|
|
|
+ private void UpdateRedDot()
|
|
|
+ {
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnReward, StudioDataManager.Instance.GetFilingRewardState(StudioDataManager.Instance.filingChapterId));
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnChange, RedDotDataManager.Instance.GetStudioFilingRed(false));
|
|
|
+ }
|
|
|
}
|
|
|
}
|