public void ConfigureYesOrNoButtons()
 {
     yesButton.SetState(ActiveState.ENABLE);
     noButton.SetState(ActiveState.ENABLE);
     yesButton.AddClickEvent(() => { ConfigureYesOrNoQuestion(true); });
     noButton.AddClickEvent(() => { ConfigureYesOrNoQuestion(false); });
 }
Ejemplo n.º 2
0
        public void ShowResults(Results result)
        {
            wishesAdded.Clear();
            string textToShow = string.Format(result.starSurvived ? SURVIVED_TEXT : PERISHED_TEXT, result.starName);

            textController.ShowText(textToShow, onClick: () => {
                float delay = 0.1f;
                if (wishListOnScreen)
                {
                    HideResults();
                    delay = 1f;
                }

                this.RunDelayed(delay, () => {
                    wishListOnScreen = true;
                    textController.HideText();
                    int starIndex = PlayerController.GetPlayerLastStar();
                    SetHeader(starIndex, result);
                    SetWishes(starIndex);
                    scrollElement.SetState(ActiveState.ENABLE, 1f, 2f);
                    PlayerController.SetPlayerStatus(PlayerStatus.NEVER_PLAYED);
                });
            });

            continueButton.SetState(ActiveState.ENABLE);
            creditsButton.SetState(ActiveState.ENABLE);

            continueButton.AddClickEvent(() => {
                HideResults();
                FindObjectOfType <CutsceneController> ().InitializeGame();
            });
            creditsButton.AddClickEvent(() => {
                FindObjectOfType <CreditsController> ().ShowCredits();
            });
        }