Ejemplo n.º 1
0
        public void InitWindow()
        {
            int nextChapter = SceneManager.NextChapter;
            int nextLevel   = SceneManager.NextLevel;
            //print(" nextChapter  " + nextChapter + "  nextLevel  " + nextLevel);
            int    numberOfBounces = LevelManager.GetMaxTaps(nextChapter, nextLevel);
            int    numberOfCoins   = LevelManager.GetCoinsInLevel(nextChapter, nextLevel);
            string typeOfAnimal    = LevelManager.GetChapterAnimalName(nextChapter, nextLevel);
            string resultsMessage;

            resultsMessage = ParseMessageString(beginLevelMessage, numberOfBounces, numberOfCoins, typeOfAnimal);

            //Text messageText = titleText;
            AnimalNameText.text    = typeOfAnimal.ToUpper();
            ChapterNumberText.text = nextChapter.ToString();
            LevelNumberText.text   = nextLevel.ToString();
            titleText.text         = resultsMessage;
        }
Ejemplo n.º 2
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);
        }