示例#1
0
        protected override void IntroReady()
        {
            Choom.Play("Music/credits");
            Choom.Pause(false);

            objectives.CheckComplete();
            Objectives.CheckAchievements();

            if (Objectives.AnyComplete)
            {
                LeanTween.delayedCall(4, () => {
                    menu.ignore_input = false;
                    refocusSelected.SetActive(true);
                    menu.SetFocus(refocusSelected);
                    objectives.Play(HashIDs.menu.Outtro);
                });
            }
            else
            {
                menu.ignore_input = false;
                refocusSelected.SetActive(true);
                menu.SetFocus(refocusSelected);
                objectives.Play(HashIDs.menu.Outtro);
            }

            MenuCredits.DisplayEnding = true;
            MenuCredits.ScrollDelay   = 3;
        }
示例#2
0
        void OnEnable()
        {
            animator.speed = 0;
            refocusSelected.SetActive(false);

            MetaState.end_game = false;
            AppMain.screenShake(0, 0);
            Choom.StopAllEffects();
            Choom.Pause();

            if (MetaState.wave_number + 1 > DataStorage.StartOnWave)
            {
                DataStorage.StartOnWave = MetaState.wave_number + 1;
            }

            Objectives.BossDefeated();
            Objectives.SurvivedFinalStage();

            Platform.SaveEndWave();
            Objectives.CheckAchievements();

            objectives.UpdateText();

            menu.Fade(0.9f, 0.5f, () => {
                objectives.Play(HashIDs.menu.Intro);
                animator.speed = 1;
            });
        }
示例#3
0
        void OnEnable()
        {
            Tracker.ScreenVisit(AppMain.HasWon ? SCREEN_NAME.WAVE_COMPLETE : SCREEN_NAME.WAVE_FAILED);

            AppMain.screenShake(0, 0);
            Choom.StopAllEffects();
            Choom.Pause();

            if (AppMain.HasWon)
            {
                if (MetaState.wave_number % 3 == 2)
                {
                    Objectives.BossDefeated();
                }

                if (MetaState.wave_number + 1 > DataStorage.StartOnWave &&
                    !MetaState.hardcore_mode)
                {
                    DataStorage.StartOnWave = MetaState.wave_number + 1;
                }
            }
            else
            {
                DataStorage.TimesDefeated++;

                if (MetaState.hardcore_mode)
                {
                    Game.instance.saveHardcoreScore();
                    Platform.SaveHardcore();
                }
            }

            Platform.SaveEndWave();
            Objectives.CheckAchievements();

            titles[0].SetActive(AppMain.HasWon);
            titles[1].SetActive(!AppMain.HasWon);

            for (int i = 0; i < buttons.Length; ++i)
            {
                buttons[i].SetActive(true);
            }
            refocusSelected = buttons[0].gameObject;

            menu.builder.Length = 0;
            if (MetaState.hardcore_mode && AppMain.HasWon)
            {
                menu.builder.AppendFormat("Hardcore mode score so far: {0}", MoneyGuy.me.printed_score);
                buttons[0].SetActive(true);
                buttons[1].SetActive(false);
                buttons[2].SetActive(true);
            }
            else if (MetaState.hardcore_mode && !AppMain.HasWon)
            {
                menu.builder.AppendFormat("Final hardcore mode score: {0}", MoneyGuy.me.printed_score);
                refocusSelected = buttons[2].gameObject;
                buttons[0].SetActive(false);
                buttons[1].SetActive(false);
                buttons[2].SetActive(true);
            }
            else if (AppMain.HasWon && MetaState.wave_number < GText.Story.story.Length)
            {
                menu.builder.Append(GText.Story.story[MetaState.wave_number]);
            }
            else
            {
                menu.builder.Append(GText.Story.tips[Random.Range(0, GText.Story.tips.Length)]);
            }

            waveResponse.item = AppMain.HasWon ? MenuItem.NextWave : MenuItem.RetryWave;
            waveResponse.GetComponent <TextMeshProUGUI>().text = AppMain.HasWon ? "Next Wave" : "Retry Wave";

            topLeftText.text = menu.builder.ToString();

            menu.SetActiveDayName(false);
            menu.Fade(0.9f, 1);
        }