示例#1
0
        void Start()
        {
            if (LevelManager.NewChapterOpened)
            {
                activeChapter = Mathf.Clamp(LevelManager.GetGetHighestChapterOpened() - 1, 0, int.MaxValue);
            }
            else
            {
                activeChapter = LevelManager.GetGetHighestChapterOpened();
            }

            activePanelY = rectTransform.anchoredPosition.y;
            if (!dummyChapterPanel)
            {
                ChapterAnimalName  = LevelManager.GetChapterAnimalName(chapterNumber, 1);
                ChapterMainColor   = LevelManager.GetChapterMainColor(chapterNumber);
                ChapterSecondColor = LevelManager.GetChapterSecondColor(chapterNumber);
                ChapterThirdColor  = LevelManager.GetChapterThirdColor(chapterNumber);
                SetUpChildObjects();
            }
            InitRestPositionsArray();
            UpdateRestingY();
            rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, restingY);
        }