|
@@ -83,6 +83,7 @@ namespace GFGGame
|
|
|
_ui.m_btnHome.onClick.Add(OnClickBtnHome);
|
|
|
_ui.m_switchChapter.onClick.Add(OnClickSwitchBack);
|
|
|
_ui.m_chapter.m_compChapterScroll.m_imgBegin.onClick.Add(OnClickNext);
|
|
|
+ _ui.m_suitIcon.onClick.Add(OnClickGotoView);
|
|
|
_ui.m_bonusBox1.target.onClick.Add(() =>
|
|
|
{
|
|
|
OnClickBonusBox(_ui.m_bonusBox1, 0);
|
|
@@ -142,6 +143,7 @@ namespace GFGGame
|
|
|
gamey = GameObject.Find("Stage/GRoot/Window - StoryChapterUI/ContentPane/CompChapter/Container/Container");
|
|
|
_ui.m_chapter.m_compChapterScroll.m_imgBegin.visible = false;
|
|
|
_ui.m_chapter.m_compChapterScroll.m_nextEffect.visible = false;
|
|
|
+ _ui.m_targetSuit.visible = false;
|
|
|
|
|
|
Timers.inst.StartCoroutine(InitChapter());
|
|
|
|
|
@@ -211,6 +213,11 @@ namespace GFGGame
|
|
|
Timers.inst.Remove(SetContainerY);
|
|
|
ViewManager.Show<StoryChapterListView>(new object[] {Mathf.Max(0, currentDifficulty) , newIndex });
|
|
|
}
|
|
|
+ private void OnClickGotoView()
|
|
|
+ {
|
|
|
+ StoryChapterCfg chapterSuitCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
|
|
|
+ ViewManager.Show<ClothingSyntheticView>(new object[] { chapterSuitCfg.suitId});
|
|
|
+ }
|
|
|
|
|
|
private void OnClickBtnHome()
|
|
|
{
|
|
@@ -219,7 +226,8 @@ namespace GFGGame
|
|
|
|
|
|
private void OnClickNext()
|
|
|
{
|
|
|
- if (MainStoryDataManager.CheckChapterUnlock(_chapterID+1))
|
|
|
+ StoryChapterCfg chapterSuitCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
|
|
|
+ if (MainStoryDataManager.CheckChapterUnlock(_chapterID+1) && StoryController.CheckSuitGot(chapterSuitCfg.suitId))
|
|
|
{
|
|
|
Timers.inst.Remove(SetContainerY);
|
|
|
ViewManager.Show<StoryChapterView>(new object[] { _chapterID+1, currentDifficulty });
|
|
@@ -233,7 +241,7 @@ namespace GFGGame
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- PromptController.Instance.ShowFloatTextPrompt("需通关前置关卡");
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("需集齐所需套装");
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -268,6 +276,21 @@ namespace GFGGame
|
|
|
{
|
|
|
_ui.m_chapter.m_compChapterScroll.m_imgBegin.visible = true;
|
|
|
_ui.m_chapter.m_compChapterScroll.m_nextEffect.visible = true;
|
|
|
+ if(chapterCfg.suitId > 0 && chapterCfg.subType == 0)
|
|
|
+ {
|
|
|
+ _ui.m_targetSuit.visible = true;
|
|
|
+ SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(chapterCfg.suitId);
|
|
|
+ _ui.m_suitIcon.url = ResPathUtil.GetIconPath(suitCfg.res, "png");
|
|
|
+ _ui.m_suitText.text = suitCfg.name;
|
|
|
+ int count;
|
|
|
+ int totalCount;
|
|
|
+ DressUpMenuSuitDataManager.GetSuitProgressBySuitId(chapterCfg.suitId, out count, out totalCount);
|
|
|
+ _ui.m_suitNum.text = count + "/" + totalCount;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _ui.m_targetSuit.visible = false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//根据困难程度选择显示图片
|