示例#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);
        }
示例#2
0
 void OnEnable()
 {
     outline.effectColor = LevelManager.GetChapterMainColor(UIChapterPanel.ActiveChapter);
 }
示例#3
0
 void OnEnable()
 {
     animalImage.sprite = animalImages[UIChapterPanel.ActiveChapter - 1];
     animalImage.color  = LevelManager.GetChapterMainColor(UIChapterPanel.ActiveChapter);
 }