|
@@ -129,8 +129,9 @@ namespace GFGGame
|
|
|
|
|
|
StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
|
|
|
newIndex = StoryUtil.GetChapterOrder(chapterCfg.id);
|
|
|
- indexY = 115.0f * (float)StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterCfg.type, chapterCfg.subType, chapterCfg.id).Count;
|
|
|
+ indexY = 111.0f * Mathf.Max(0, (float)StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterCfg.type, chapterCfg.subType, chapterCfg.id).Count - 5);
|
|
|
gamey = GameObject.Find("Stage/GRoot/Window - StoryChapterUI/ContentPane/CompChapter/Container/Container");
|
|
|
+ _ui.m_chapter.m_compChapterScroll.m_imgBegin.visible = false;
|
|
|
|
|
|
Timers.inst.StartCoroutine(InitChapter());
|
|
|
|
|
@@ -141,16 +142,6 @@ namespace GFGGame
|
|
|
_ui.target.touchable = true;
|
|
|
|
|
|
Timers.inst.AddUpdate(CheckGuide);
|
|
|
-
|
|
|
- int chapterNum = StoryChapterCfgArray.Instance.GetCfgsBysubType(currentDifficulty).Count;
|
|
|
- if (MainStoryDataManager.CurrentChapterOrder == chapterNum)
|
|
|
- {
|
|
|
- _ui.m_chapter.m_compChapterScroll.m_imgBegin.visible = false;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- _ui.m_chapter.m_compChapterScroll.m_imgBegin.visible = true;
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
@@ -231,7 +222,12 @@ namespace GFGGame
|
|
|
float starPosY = _ui.m_chapter.m_compChapterScroll.m_imgBegin.y;
|
|
|
int lineGap = 4500 / list.Count;
|
|
|
|
|
|
- _comEff.visible = false;
|
|
|
+ StoryLevelCfg lastLevelCfg = list[list.Count - 1];
|
|
|
+ if (lastLevelCfg != null && MainStoryDataManager.CheckLevelUnlock(lastLevelCfg.id))
|
|
|
+ {
|
|
|
+ _ui.m_chapter.m_compChapterScroll.m_imgBegin.visible = true;
|
|
|
+ }
|
|
|
+ _comEff.visible = false;
|
|
|
_effFirst.visible = false;
|
|
|
for (int i = 0; i < 20; i++)
|
|
|
{
|
|
@@ -349,15 +345,15 @@ namespace GFGGame
|
|
|
}
|
|
|
yield return new WaitForEndOfFrame();
|
|
|
|
|
|
- _ui.m_chapter.m_compChapterScroll.target.y =Mathf.Max(1 , _ui.m_chapter.target.height - _ui.m_chapter.m_compChapterScroll.target.height);
|
|
|
+ _ui.m_chapter.m_compChapterScroll.target.y = 0; //Mathf.Max(0, _ui.m_chapter.target.height - _ui.m_chapter.m_compChapterScroll.target.height);
|
|
|
|
|
|
- if(gamey != null)
|
|
|
+ if (gamey != null)
|
|
|
gamey.transform.position = new Vector3(0, indexY, 0);
|
|
|
}
|
|
|
|
|
|
private void SetContainerY(object param = null)
|
|
|
{
|
|
|
- _ui.m_chapter.m_compChapterScroll.target.y = Mathf.Max(0, _ui.m_chapter.target.height - _ui.m_chapter.m_compChapterScroll.target.height - 1);
|
|
|
+ _ui.m_chapter.m_compChapterScroll.target.y = 1; //Mathf.Max(0, _ui.m_chapter.target.height - _ui.m_chapter.m_compChapterScroll.target.height - 1);
|
|
|
}
|
|
|
|
|
|
private void HideEffect(object param = null)
|