Exemple #1
0
        protected override void Start()
        {
            base.Start();
            GlobalUI.ShowPauseMenu(false);

            Invoke("PlayFeedback", 0.2f);
        }
Exemple #2
0
        void Start()
        {
            // Setup for testing
            Application.runInBackground        = true;
            ApplicationConfig.I.VerboseTeacher = true;
            ConfigAI.ForceJourneyIgnore        = false;

            /*
             * journey_stage_in.onValueChanged.AddListener(x => { currentJourneyStage = int.Parse(x); });
             * journey_learningblock_in.onValueChanged.AddListener(x => { currentJourneyLB = int.Parse(x); });
             * journey_playsession_in.onValueChanged.AddListener(x => { currentJourneyPS = int.Parse(x); });
             *
             * npacks_in.onValueChanged.AddListener(x => { nPacks = int.Parse(x); });
             * ncorrect_in.onValueChanged.AddListener(x => { nCorrectAnswers = int.Parse(x); });
             * nwrong_in.onValueChanged.AddListener(x => { nWrongAnswers = int.Parse(x); });
             *
             * severity_in.onValueChanged.AddListener(x => { correctSeverity = (SelectionSeverity)x; });
             * severitywrong_in.onValueChanged.AddListener(x => { wrongSeverity = (SelectionSeverity)x; });
             *
             * history_in.onValueChanged.AddListener(x => { correctHistory = (PackListHistory)x; });
             * historywrong_in.onValueChanged.AddListener(x => { wrongHistory = (PackListHistory)x; });
             *
             * journeybase_in.onValueChanged.AddListener(x => { journeyEnabledForBase = x; });
             * journeywrong_in.onValueChanged.AddListener(x => { journeyEnabledForWrong = x; });
             */

            GlobalUI.ShowPauseMenu(false);
        }
Exemple #3
0
        protected override void Start()
        {
            base.Start();
            GlobalUI.ShowPauseMenu(false);

            // We force subtitles on when we enter this scene to show the player that they can read
            if (!AppManager.I.AppSettings.KeeperSubtitlesEnabled)
            {
                AppManager.I.AppSettingsManager.ToggleKeeperSubtitles();
            }

            m_CameraEndPosition   = Camera.main.transform.position;
            m_CameraStartPosition = m_CameraEndPosition + cameraOffset;
            autoMoveObjects       = environment.GetComponentsInChildren <AutoMove>();

            var lettersData = AppManager.I.Teacher.GetAllTestLetterDataLL();

            foreach (var l in Letters)
            {
                l.Init(lettersData.GetRandom());
                l.State = LLAnimationStates.LL_dancing;
            }

            Antura.State = AnturaAnimationStates.dancing;

            text.SetSentence(Database.LocalizationDataId.End_Scene_2);
            text.Alpha = 0;
            panel.SetAlpha(0);
        }
Exemple #4
0
        protected override void Start()
        {
            base.Start();

            GlobalUI.ShowPauseMenu(false);
            //ShowBackButton();

            CurrentState = Idle;

            ShopActionsManager.Initialise();
            UI.Initialise();

            TutorialManager tutorialManager = gameObject.GetComponentInChildren <AnturaSpaceTutorialManager>();

            tutorialManager.HandleStart();

            if (!tutorialManager.IsRunning)
            {
                // Also play a welcome
                KeeperManager.I.PlayDialogue(new[]
                {
                    LocalizationDataId.AnturaSpace_Welcome_1,
                    LocalizationDataId.AnturaSpace_Welcome_2,
                    LocalizationDataId.AnturaSpace_Welcome_3
                }.GetRandom());
            }
        }
Exemple #5
0
        void Start()
        {
            GlobalUI.ShowPauseMenu(false);
            foreach (var go in HideAtStartup)
            {
                go.SetActive(false);
            }

            if (OpeningArea != BookArea.None)
            {
                BookManager.I.OpenBook(OpeningArea);
            }

            //GlobalUI.ShowBackButton(true, GoBackCustom);
            //AudioManager.I.PlayMusic(SceneMusic);
            //AudioManager.I.PlayDialogue("Book_Intro");

            //HideAllPanels();
            //if (OverridenOpeningArea != BookArea.None) {
            //    OpenArea(OverridenOpeningArea);
            //} else {
            //    OpenArea(OpeningArea);
            //}

            // Debug.Log("PREV SCENE IS RESERVED AREA: " + AppManager.I.NavigationManager.PrevSceneIsReservedArea());
        }
Exemple #6
0
 /// <summary>
 /// Never use this directly! Use the <code>Minigames Interface</code> instead.
 /// </summary>
 public static void HideEndgameResult(bool _immediate = false)
 {
     //if (I == null) return;
     GlobalUI.ShowPauseMenu(true);
     I.BonesCounter.Hide();
     I.EndgameResultPanel.Hide(_immediate);
 }
Exemple #7
0
        protected override void Start()
        {
            base.Start();
            GlobalUI.ShowPauseMenu(false);

            if ((AppManager.I.Player.CurrentJourneyPosition.PlaySession) < 2)
            {
                KeeperManager.I.PlayDialog(Database.LocalizationDataId.Mood_Question_2);
            }
            else
            {
                int rnd = Random.Range(1, 3);
                switch (rnd)
                {
                case 1:
                    KeeperManager.I.PlayDialog(Database.LocalizationDataId.Mood_Question_1);
                    break;

                case 3:
                    KeeperManager.I.PlayDialog(Database.LocalizationDataId.Mood_Question_3);
                    break;

                default:
                    KeeperManager.I.PlayDialog(Database.LocalizationDataId.Mood_Question_2);
                    break;
                }
            }
        }
        void Start()
        {
            // Setup for testing
            ConfigAI.verboseDataSelection = true;
            ConfigAI.verboseTeacher       = true;
            ConfigAI.forceJourneyIgnore   = false;

            journey_stage_in.onValueChanged.AddListener(x => { currentJourneyStage = int.Parse(x); });
            journey_learningblock_in.onValueChanged.AddListener(x => { currentJourneyLB = int.Parse(x); });
            journey_playsession_in.onValueChanged.AddListener(x => { currentJourneyPS = int.Parse(x); });

            npacks_in.onValueChanged.AddListener(x => { nPacks = int.Parse(x); });
            ncorrect_in.onValueChanged.AddListener(x => { nCorrect = int.Parse(x); });
            nwrong_in.onValueChanged.AddListener(x => { nWrong = int.Parse(x); });

            severity_in.onValueChanged.AddListener(x => { correctSeverity = (SelectionSeverity)x; });
            severitywrong_in.onValueChanged.AddListener(x => { wrongSeverity = (SelectionSeverity)x; });

            history_in.onValueChanged.AddListener(x => { correctHistory = (PackListHistory)x; });
            historywrong_in.onValueChanged.AddListener(x => { wrongHistory = (PackListHistory)x; });

            journeybase_in.onValueChanged.AddListener(x => { journeyEnabledForBase = x; });
            journeywrong_in.onValueChanged.AddListener(x => { journeyEnabledForWrong = x; });

            GlobalUI.ShowPauseMenu(false);
        }
Exemple #9
0
        protected override void Start()
        {
            base.Start();

            GlobalUI.ShowPauseMenu(false);
            GlobalUI.ShowBackButton(true);
        }
        protected override void Start()
        {
            base.Start();
            GlobalUI.ShowPauseMenu(false);
            GlobalUI.ShowBackButton(true);

            DebugManager.OnSkipCurrentScene += HandleSceneSkip;
        }
Exemple #11
0
 public void CloseReservedAreaPanel()
 {
     AudioManager.I.PlaySound(Sfx.UIButtonClick);
     DialogReservedArea.SetActive(false);
     ProfileSelectorUI.SetActive(true);
     GlobalUI.ShowPauseMenu(true, PauseMenuType.StartScreen);
     reservedAreaIsOpen = false;
 }
Exemple #12
0
 public void OpenReservedAreaPanel()
 {
     AudioManager.I.PlaySound(Sfx.UIButtonClick);
     DialogReservedArea.SetActive(true);
     ProfileSelectorUI.SetActive(false);
     GlobalUI.ShowPauseMenu(false);
     reservedAreaIsOpen = true;
 }
Exemple #13
0
        /// <summary>
        /// Start the game using the currently selected player.
        /// </summary>
        public void Play()
        {
            // Debug.Log("Play with Player: " + AppManager.I.Player);
            GlobalUI.ShowPauseMenu(true);

            AppManager.I.StartNewPlaySession();
            AppManager.I.NavigationManager.GoToNextScene();
        }
Exemple #14
0
        /// <summary>
        /// Never use this directly! Use the <code>Minigames Interface</code> instead.
        /// </summary>
        public static void ShowEndgameResult(int _numStars)
        {
            Init();
            GlobalUI.ShowPauseMenu(false);

            I.BonesCounter.GetComponent <RectTransform>().anchoredPosition = I.BonesCounterEndgamePos;
            I.BonesCounter.Hide();
            I.EndgameResultPanel.Show(_numStars);
        }
Exemple #15
0
        protected override void Start()
        {
            base.Start();
            GlobalUI.ShowPauseMenu(true, PauseMenuType.StartScreen);
            KeeperManager.I.PlayDialogue(LocalizationDataId.Game_Title_2, false, true, TutorCreateProfile, KeeperMode.LearningThenNativeNoSubtitles);

            AnturaAnimController.State = AnturaAnimation;
            LLAnimController.State     = LLAnimation;
        }
Exemple #16
0
 /// <summary>
 /// Never use this directly! Use the <code>Minigames Interface</code> instead.
 /// </summary>
 public static void HideEndsessionResult(bool _immediate = false)
 {
     if (I == null)
     {
         return;
     }
     GlobalUI.ShowPauseMenu(true);
     //I.BonesCounter.Hide();
     I.EndsessionResultPanel.Hide(_immediate);
 }
Exemple #17
0
 /// <summary>
 /// Returns an array with 2 gameObjects inside which to place the rewards prefab (0 is first reward, 1 is second).
 /// <para><code>IMPORTANT:</code> do not modify the returned array, just use its data</para>
 /// </summary>
 /// <param name="_sessionData">A list of data for each minigame that was part of the session</param>
 /// <param name="_alreadyUnlockedRewards">Total rewards unlocked in previous sessions (0 to 2)</param>
 /// <param name="_immediate">If TRUE shows the screen immediately with no animations. You can ignore this</param>
 /// <returns></returns>
 public static GameObject[] ShowEndsessionResult(List <EndsessionResultData> _sessionData, int _alreadyUnlockedRewards,
                                                 bool _immediate = false)
 {
     Init();
     GlobalUI.ShowPauseMenu(false);
     //I.BonesCounter.GetComponent<RectTransform>().anchoredPosition = I.BonesCounterEndsessionPos;
     //I.BonesCounter.Hide();
     I.EndsessionResultPanel.Show(_sessionData, _alreadyUnlockedRewards, _immediate);
     return(I.EndsessionResultPanel.RewardsGos);
 }
Exemple #18
0
        protected override void Start()
        {
            base.Start();
            GlobalUI.ShowPauseMenu(true, PauseMenuType.StartScreen);
            AudioManager.I.PlaySound(Sfx.GameTitle);

            AnturaAnimController.State = AnturaAnimation;
            LLAnimController.State     = LLAnimation;

            // after 2 seconds (after the game title audio) invite palyer to create a profile
            Invoke("TutorCreateProfile", 2.3f);
        }
        void Start()
        {
            GlobalUI.ShowPauseMenu(false);

            InitUI();

            foreach (var l in AppManager.I.DB.StaticDatabase.GetLetterTable().GetValuesTyped())
            {
                if (AudioManager.I.GetAudioClip(l) == null)
                {
                    Debug.LogError("Cannot find audio file: " + l);
                }
            }
        }
Exemple #20
0
        protected override void Start()
        {
            base.Start();
            GlobalUI.ShowPauseMenu(false);

            countDown             = new CountdownTimer(m_EndDelay);
            m_CameraEndPosition   = Camera.main.transform.position;
            m_CameraStartPosition = m_CameraEndPosition + cameraOffset;
            autoMoveObjects       = environment.GetComponentsInChildren <AutoMove>();

            foreach (var mazeCharacter in m_MazeCharacters)
            {
                mazeCharacter.transform.position += new Vector3(0, 10f, 0);
                mazeCharacter.m_Velocity          = m_MazeCharactesVelocity;
            }
        }
Exemple #21
0
        protected override void Start()
        {
            base.Start();

            GlobalUI.ShowPauseMenu(false);
            //ShowBackButton();

            CurrentState = Idle;

            ShopActionsManager.Initialise();
            UI.Initialise();

            TutorialManager tutorialManager = gameObject.GetComponentInChildren <AnturaSpaceTutorialManager>();

            tutorialManager.HandleStart();
        }
Exemple #22
0
        //public Button AnturaSpaceBtton;

        //Tween btAnturaTween;

        protected override void Start()
        {
            base.Start();
            GlobalUI.ShowPauseMenu(false);
            //Debug.Log("RewardsManager playsession: " + AppManager.I.Player.CurrentJourneyPosition.PlaySession);

            AnturaAnimController.State = AnturaAnimation;
            //AnturaSpaceBtton.gameObject.SetActive(false);
            ShowReward();

            //AnturaSpaceBtton.onClick.AddListener(() => AppManager.I.NavigationManager.GoToAnturaSpace());

            tutorialManager = gameObject.GetComponentInChildren <RewardsTutorialManager>();
            tutorialManager.HandleStart();

            DebugManager.OnSkipCurrentScene += HandleSceneSkip;
        }
Exemple #23
0
        protected override void Start()
        {
            base.Start();
            GlobalUI.ShowPauseMenu(false, PauseMenuType.StartScreen);
            KeeperManager.I.PlayDialogue(LocalizationDataId.Game_Title_2, false, true, null, KeeperMode.LearningThenNativeNoSubtitles);

            AnturaAnimController.State = AnturaAnimation;
            LLAnimController.State     = LLAnimation;

            LLAnimController.Init(AppManager.I.Teacher.GetRandomTestLetterLL(useMaxJourneyData: true));

            AppManager.I.AppSettings.KioskMode              = true;
            AppManager.I.AppSettings.ShareAnalyticsEnabled  = true;
            AppManager.I.AppSettings.KeeperSubtitlesEnabled = true;
            updateUI();

            AppManager.I.Services.Analytics.TrackKioskEvent("kiosk_home");
        }
Exemple #24
0
        protected override void Start()
        {
            base.Start();
            GlobalUI.ShowPauseMenu(false, PauseMenuType.StartScreen);
            AudioManager.I.PlaySound(Sfx.GameTitle);

            AnturaAnimController.State = AnturaAnimation;
            LLAnimController.State     = LLAnimation;

            LLAnimController.Init(AppManager.I.Teacher.GetRandomTestLetterLL(useMaxJourneyData: true));

            AppManager.I.AppSettings.KioskMode             = true;
            AppManager.I.AppSettings.ShareAnalyticsEnabled = true;
            AppManager.I.AppSettings.SubtitlesEnabled      = true;
            AppManager.I.AppSettings.EnglishSubtitles      = true;
            updateUI();

            AppManager.I.Services.Analytics.TrackKioskEvent("kiosk_home");
        }
Exemple #25
0
        protected override void Start()
        {
            Debug.Log("BootstrapScene: Start()");
            GlobalUI.ShowPauseMenu(false);

            StartCoroutine(StartCO());

            //if (AppManager.I.AppSettingsManager.IsAppJustUpdatedFromOldVersion()) {
            //    Debug.Log("BootstrapScene: Updating from Old version");
            //    if (AppManager.I.AppSettings.SavedPlayers != null) {
            //        AppManager.I.PlayerProfileManager.DeleteAllPlayers();
            //        PanelAppUpdate.Init();
            //    } else {
            //        GoToHomeScene();
            //    }
            //} else {
            //    GoToHomeScene();
            //}
        }
Exemple #26
0
        protected override void Start()
        {
            base.Start();
            GlobalUI.ShowPauseMenu(false);

            m_CameraEndPosition   = Camera.main.transform.position;
            m_CameraStartPosition = m_CameraEndPosition + cameraOffset;
            autoMoveObjects       = environment.GetComponentsInChildren <AutoMove>();

            var lettersData = AppManager.I.Teacher.GetAllTestLetterDataLL();

            foreach (var l in Letters)
            {
                l.Init(lettersData.GetRandom());
                l.State = LLAnimationStates.LL_dancing;
            }

            Antura.State = AnturaAnimationStates.dancing;

            text.SetSentence(Database.LocalizationDataId.End_Scene_2);
            text.Alpha = 0;
            panel.SetAlpha(0);
        }
Exemple #27
0
 public void PauseMenu_ShowGame()
 {
     GlobalUI.ShowPauseMenu(true, PauseMenuType.GameScreen);
 }
Exemple #28
0
 public void PauseMenu_ShowUtility()
 {
     GlobalUI.ShowPauseMenu(true, PauseMenuType.UtilityScreen);
 }
Exemple #29
0
 public void PauseMenu_ShowStart()
 {
     GlobalUI.ShowPauseMenu(true, PauseMenuType.StartScreen);
 }
Exemple #30
0
        protected override void Start()
        {
            base.Start();
            GlobalUI.ShowPauseMenu(false);

            // Cleanup UI
            foreach (Transform childTr in dailyRewardUIPivot.transform)
            {
                Destroy(childTr.gameObject);
            }

            dailyRewardManager = new DailyRewardManager();
            int nCurrentConsecutiveDaysOfPlaying = AppManager.I.Player.ConsecutivePlayDays;

            nCurrentConsecutiveDaysOfPlaying = Mathf.Max(nCurrentConsecutiveDaysOfPlaying, 1);

            if (useForcedConsecutiveDays)
            {
                nCurrentConsecutiveDaysOfPlaying = forcedConsecutiveDays;
                Debug.LogError("FORCING CONSECUTIVE DAYS: " + nCurrentConsecutiveDaysOfPlaying);
            }

            Debug.Assert(nCurrentConsecutiveDaysOfPlaying >= 1, "Should not access this scene with 0 consecutive days");

            // Index of the new reward (for the content, not the UI)
            newRewardContentIndex = nCurrentConsecutiveDaysOfPlaying - 1;
            int startShownRewardContentIndex = Mathf.Max(0, newRewardContentIndex - 2);

            int nRewardsToShowToday = Mathf.Min(MAX_REWARDS_TO_SHOW, nCurrentConsecutiveDaysOfPlaying + 2);

            // 0 days -> nothing!
            // 1 days -> first reward
            // 2+ days -> second reward
            newRewardUIIndex = Mathf.Min(newRewardContentIndex, 2);

            /*
             * Debug.Log("New Reward Index: " + newRewardContentIndex);
             * Debug.Log("New Reward UI Index: " + newRewardUIIndex);
             */

            // Initialise rewards
            dailyRewardUIs = new List <DailyRewardUI>();
            int dayCounter = 0;

            dayCounter += startShownRewardContentIndex;

            foreach (var reward in dailyRewardManager.GetRewards(startShownRewardContentIndex,
                                                                 startShownRewardContentIndex + nRewardsToShowToday
                                                                 ))
            {
                //Debug.Log("Reward for day " + dayCounter + " is " + reward.amount);

                dayCounter++;
                var dailyRewardUIGo = Instantiate(dailyRewardUIPrefab);
                dailyRewardUIGo.transform.SetParent(dailyRewardUIPivot);
                dailyRewardUIGo.transform.localScale    = Vector3.one;
                dailyRewardUIGo.transform.localPosition = Vector3.zero;
                var dailyRewardUI = dailyRewardUIGo.GetComponent <DailyRewardUI>();
                dailyRewardUI.SetReward(reward);
                dailyRewardUI.SetDay(dayCounter);
                dailyRewardUI.HideDay();
                dailyRewardUI.SetLocked();
                dailyRewardUIs.Add(dailyRewardUI);
            }

            // Unlock the previous rewards
            for (int combo_i = 0; combo_i < newRewardUIIndex; combo_i++)
            {
                dailyRewardUIs[combo_i].SetUnlocked();
            }
            // Prepare the next one
            dailyRewardUIs[newRewardUIIndex].SetReadyToBeUnlocked();

            // Initialise UI as hidden
            bonesCounter.Hide();
            todayPivot.transform.position = Vector3.right * 1000;
            todayPivot.gameObject.SetActive(false);
            yesterdayTextGo.SetActive(newRewardUIIndex > 0);
            claimButton.gameObject.SetActive(false);

            claimButton.onClick.AddListener(UnlockNewReward);

            // Start from the left
            bool  withTranslation = nCurrentConsecutiveDaysOfPlaying != 1;
            int   rtlDir          = LanguageSwitcher.LearningRTL ? 1 : -1;
            float targetX         = dailyRewardUIPivot.transform.localPosition.x;

            if (withTranslation)
            {
                dailyRewardUIPivot.transform.localPosition += Vector3.left * 200 * rtlDir;
            }

            StartCoroutine(IntroCO(withTranslation, targetX));
        }