예제 #1
0
        public void Show(bool _doShow, bool _immediate = false)
        {
            GlobalUI.Init();

            IsShown = _doShow;
            if (_doShow)
            {
                clicked = false;
                if (_immediate)
                {
                    I.showTween.Complete();
                }
                else
                {
                    I.showTween.PlayForward();
                }
            }
            else
            {
                if (_immediate)
                {
                    I.showTween.Rewind();
                }
                else
                {
                    I.showTween.PlayBackwards();
                }
            }
        }
        void Start()
        {
            NavigationManager.I.CurrentScene = AppScene.Rewards;

            if (AppManager.I.Player.IsFirstContact())
            {
                GlobalUI.ShowPauseMenu(false);
            }

            AudioManager.I.PlayMusic(Music.Theme10);
            Debug.Log("RewardsManager playsession: " + AppManager.I.Player.CurrentJourneyPosition.PlaySession);

            // here we set the Rewards base on current progression level (playsession -1 because Rewards appear when playsession is already incremented)
            //if ((AppManager.I.Player.CurrentJourneyPosition.PlaySession - 1) == 1) {
            //    AppManager.I.Player.AnturaCurrentPreset = 1;

            //    tutorialIndex = 10;
            //    //LoggerEA4S.Log("app", "Reward", "get_reward", "1");
            //    LogManager.I.LogInfo(InfoEvent.Reward, "reward:1");
            //} else if ((AppManager.I.Player.CurrentJourneyPosition.PlaySession - 1) == 2) {
            //    AppManager.I.Player.AnturaCurrentPreset = 2;
            //    tutorialIndex = 20;
            //    //LoggerEA4S.Log("app", "Reward", "get_reward", "2");
            //    LogManager.I.LogInfo(InfoEvent.Reward, "reward:2");
            //} else if ((AppManager.I.Player.CurrentJourneyPosition.PlaySession - 1) > 2) {
            //    AppManager.I.Player.AnturaCurrentPreset = 3;
            //    tutorialIndex = 30;
            //    //LoggerEA4S.Log("app", "Reward", "get_reward", "3");
            //    LogManager.I.LogInfo(InfoEvent.Reward, "reward:3");
            //}

            AnturaAnimController.State = AnturaAnimation;
            SceneTransitioner.Close();
            ShowReward();
        }
예제 #3
0
        public void Play()
        {
            Debug.Log("Play with Player ID: " + AppManager.I.Player.Id);

            GlobalUI.ShowPauseMenu(true);

            LogManager.I.InitNewSession();
            LogManager.I.LogInfo(InfoEvent.AppPlay, JsonUtility.ToJson(new AppInfoParameters()));

            if (AppManager.I.Player.IsFirstContact())
            {
                NavigationManager.I.GoToScene(AppScene.Intro);
            }
            else
            {
                if (AppManager.I.Player.MoodLastVisit == System.DateTime.Today.ToString())
                {
                    NavigationManager.I.GoToScene(AppScene.Map);
                }
                else
                {
                    NavigationManager.I.GoToScene(AppScene.Mood);
                }
            }
        }
        /// <summary>
        /// Call this to show/hide the scene transitioner.
        /// </summary>
        /// <param name="_doShow">If TRUE animates the transition IN and stops when the screen is covered, otherwise animates OUT</param>
        /// <param name="_onComplete">Eventual callback to call when the transition IN/OUT completes</param>
        public static void Show(bool _doShow, Action _onComplete = null)
        {
            GlobalUI.Init();

            GlobalUI.SceneTransitioner.SetContent();
            GlobalUI.SceneTransitioner.DoShow(_doShow, _onComplete);
        }
        void Start()
        {
            if (AppManager.I.Player.IsFirstContact() == false) //if this isn't the first contact disable yourself and return
            {
                gameObject.SetActive(false);
                return;
            }

            TutorialUI.SetCamera(m_oCameraUI);

            //setup first state, disable UI
            m_eTutoState = eAnturaSpaceTutoState.ANTURA_ANIM;

#if UNITY_EDITOR
#else
            GlobalUI.ShowBackButton(false);
#endif

            m_oCookieButton.gameObject.SetActive(false);
            m_oCustomizationButton.gameObject.SetActive(false);

            AudioManager.I.PlayDialog(Db.LocalizationDataId.AnturaSpace_Intro, delegate() //dialogue try touch Antura
            {
                m_oAnturaBehaviour.onAnimationByClick += AdvanceTutorial;
                TutorialUI.ClickRepeat(m_oAnturaBehaviour.gameObject.transform.position + (Vector3.forward * -2) + (Vector3.up), float.MaxValue, 1);
            });
        }
예제 #6
0
        void Start()
        {
            NavigationManager.I.CurrentScene = AppScene.Mood;


            AudioManager.I.PlayMusic(SceneMusic);
            GlobalUI.ShowPauseMenu(false);

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

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

                default:
                    KeeperManager.I.PlayDialog(Db.LocalizationDataId.Mood_Question_2);
                    break;
                }
            }
        }
        void Start()
        {
            GlobalUI.ShowPauseMenu(false);

            InitUI();
            MyEventName = AudioConfig.GetSfxEventName(Sfx.AlarmClock);
        }
 void OnComplete()
 {
     GlobalUI.Clear(false);
     if (onCompleteCallback != null)
     {
         onCompleteCallback();
     }
 }
예제 #9
0
        void Start()
        {
            NavigationManager.I.CurrentScene = AppScene.Home;

            GlobalUI.ShowPauseMenu(true, PauseMenuType.StartScreen);
            AudioManager.I.PlayMusic(SceneMusic);
            AudioManager.I.PlaySfx(Sfx.GameTitle);

            AnturaAnimController.State = AnturaAnimation;
            LLAnimController.State     = LLAnimation;
        }
예제 #10
0
        private int m_iTotalBones_Local = 0; //maybe it's redundant, but can be useful for testing purpose
        #endregion

        #region INTERNALS
        void Start()
        {
            GlobalUI.ShowPauseMenu(false);
            GlobalUI.ShowBackButton(true, Exit);
            AudioManager.I.PlayMusic(m_oBackgroundMusic);
            LogManager.I.LogInfo(InfoEvent.AnturaSpace, "enter");

            m_iTotalBones_Local = AppManager.I.Player.GetTotalNumberOfBones();

            m_oTextBonesNumber.text = "" + m_iTotalBones_Local;

            //set the bone initial position behind the button

            /*
             * float _fCameraDistance = Mathf.Abs(Camera.main.transform.position.z - Camera.main.nearClipPlane);
             *
             * m_oBonePrefab.transform.position = Camera.main.ScreenToWorldPoint(new Vector3(m_oTextBonesNumber.rectTransform.position.x, m_oTextBonesNumber.rectTransform.position.y, _fCameraDistance));
             */
            m_oBonePrefab.transform.position = m_oTextBonesNumber.transform.position;

            //Instantiate the pool of bones
            GameObject _oTempBase = new GameObject();

            m_oCookieRootContainer      = Instantiate(_oTempBase);
            m_oCookieRootContainer.name = "[Cookies]";
            Destroy(_oTempBase);


            m_aoPool     = new GameObject[m_iMaxSpawnableBones];
            m_aiUsedList = new int[m_iMaxSpawnableBones];

            for (int _iIdx = 0; _iIdx < m_iMaxSpawnableBones; ++_iIdx)
            {
                m_aoPool[_iIdx] = Instantiate(m_oBonePrefab);

                m_aoPool[_iIdx].SetActive(false);

                m_aiUsedList[_iIdx] = _iIdx;

                m_aoPool[_iIdx].transform.SetParent(m_oCookieRootContainer.transform);
            }

            //link variables
            m_oAnturaBehaviour = m_oAntura.GetComponent <AnturaBehaviour>();
            m_oAnturaBehaviour.onBoneReached += release;
            m_oCustomButton.OnEnableAction   += delegate { m_oAnturaBehaviour.Reset(); m_oAnturaBehaviour.IsInCustomization = true; };
            m_oCustomButton.OnDisableAction  += delegate { m_oAnturaBehaviour.IsInCustomization = false; };
        }
예제 #11
0
        void Start()
        {
            GlobalUI.ShowPauseMenu(false);
            AudioManager.I.PlayMusic(SceneMusic);

            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;
            }
        }
 /// <summary>
 /// Activate view elements if SentenceId != "" and display sentence.
 /// </summary>
 public void DisplaySentence(Db.LocalizationData data, float _duration = 2, bool _isKeeper = false, System.Action _callback = null)
 {
     GlobalUI.Init();
     this.StopAllCoroutines();
     currentCallback = _callback;
     showTween.PlayForward();
     if (_isKeeper)
     {
         bgColorTween.PlayBackwards();
     }
     else
     {
         bgColorTween.PlayForward();
     }
     WalkieTalkie.Show(_isKeeper);
     DisplayText(data, _duration);
 }
예제 #13
0
        void Start()
        {
            AppManager.I.GameSettings.CheatSuperDogMode = false;
            //Debug.Log("Setting super dog mode (by default) to: " + AppManager.I.GameSettings.CheatSuperDogMode);

            GlobalUI.ShowPauseMenu(false);
            GlobalUI.ShowBackButton(true, ExitThisScene);
            AudioManager.I.PlayMusic(SceneMusic);
            LogManager.I.LogInfo(InfoEvent.Book, "enter");

            SceneTransitioner.Close();

            AudioManager.I.PlayDialog("Book_Intro");

            HideAllPanels();
            OpenPanel(OpeningPanel);
        }
예제 #14
0
        void Awake()
        {
            if (FindObjectOfType(typeof(AudioManager)) == null)
            {
                Instantiate(AudioManager);
            }

            if (FindObjectOfType(typeof(EventSystem)) == null)
            {
                Instantiate(EventsManager);
            }

            if (FindObjectOfType(typeof(Lean.Touch.LeanTouch)) == null)
            {
                Instantiate(TouchManager);
            }

            // init the mighty GlobalUI
            GlobalUI.Init();
        }
예제 #15
0
 public void OnUnlockAllGameData()
 {
     GlobalUI.ShowPrompt(true, "UNLOCK EVERYTHING? (also adds fake scores)", GoUnlockAllGameData);
 }
예제 #16
0
 public void OnResetEverything()
 {
     GlobalUI.ShowPrompt(true, "ATTENTION\nReally Reset all data and everything?", GoResetEverything);
 }
예제 #17
0
 public void OnDeleteProfile()
 {
     GlobalUI.ShowPrompt(true, "delete this profile?", GoDeleteProfile);
 }
예제 #18
0
 public void OnExportData()
 {
     GlobalUI.ShowPrompt(true, "Export the current Database?\n(not yet functional: will save the db into the device or send it to our data gathering center)", GoExportData);
 }
        /// <summary>
        /// Advance the tutorial in his sequential flow.
        /// </summary>
        public void AdvanceTutorial()
        {
            if (!gameObject.activeSelf) //block any attempt to advance if tutorial isn't active
            {
                return;
            }

            switch (m_eTutoState)
            {
            case eAnturaSpaceTutoState.ANTURA_ANIM:

                m_eTutoState = eAnturaSpaceTutoState.COOKIE_BUTTON;

                TutorialUI.Clear(false);

                m_oAnturaBehaviour.onAnimationByClick -= AdvanceTutorial;

                AudioManager.I.StopDialogue(false);

                AudioManager.I.PlayDialog(Db.LocalizationDataId.AnturaSpace_Intro_Touch, delegate()           //dialog Antura
                {
                    AudioManager.I.PlayDialog(Db.LocalizationDataId.AnturaSpace_Intro_Cookie, delegate()      //dialog cookies
                    {
                        AudioManager.I.PlayDialog(Db.LocalizationDataId.AnturaSpace_Tuto_Cookie_1, delegate() //dialog tap for cookies
                        {
                            m_oCookieButton.gameObject.SetActive(true);                                       //after the dialog make appear the cookie button
                            m_oCookieButton.onClick.AddListener(AdvanceTutorial);                             //the button can call AdvanceTutorial on click

                            //RectTransform _oRectCookieB = m_oCookieButton.gameObject.GetComponent<RectTransform>();
                            TutorialUI.ClickRepeat(m_oCookieButton.transform.position /*m_oCameraUI.ScreenToWorldPoint(new Vector3(_oRectCookieB.position.x,_oRectCookieB.position.y, m_oCameraUI.nearClipPlane))*/, float.MaxValue, 1);
                        });
                    });
                });

                break;

            case eAnturaSpaceTutoState.COOKIE_BUTTON:

                m_eTutoState = eAnturaSpaceTutoState.USE_ALL_COOKIES;

                TutorialUI.Clear(false);

                m_oCookieButton.onClick.RemoveListener(AdvanceTutorial);

                AudioManager.I.StopDialogue(false);

                AudioManager.I.PlayDialog(Db.LocalizationDataId.AnturaSpace_Tuto_Cookie_2);     //dialog drag cookies

                m_bIsDragAnimPlaying = true;
                DrawRepeatLineOnCookieButton();

                //Register delegate to disable draw line after done
                UnityEngine.EventSystems.EventTrigger.Entry _oEntry = new UnityEngine.EventSystems.EventTrigger.Entry();
                _oEntry.eventID = UnityEngine.EventSystems.EventTriggerType.EndDrag;
                _oEntry.callback.AddListener((data) => { m_bIsDragAnimPlaying = false; });

                m_oCookieButton.GetComponent <UnityEngine.EventSystems.EventTrigger>().triggers.Add(_oEntry);
                break;

            case eAnturaSpaceTutoState.USE_ALL_COOKIES:

                m_eTutoState = eAnturaSpaceTutoState.CUSTOMIZE;

                TutorialUI.Clear(false);

                AudioManager.I.StopDialogue(false);

                AudioManager.I.PlayDialog(Db.LocalizationDataId.AnturaSpace_Tuto_Cookie_3, delegate() //dialog get more cookies
                {
                    AudioManager.I.PlayDialog(Db.LocalizationDataId.AnturaSpace_Custom_1, delegate()  //dialog customize
                    {
                        m_oCustomizationButton.gameObject.SetActive(true);                            //after the dialog make appear the customization button
                        m_oCustomizationButton.onClick.AddListener(AdvanceTutorial);

                        /*AudioManager.I.PlayDialog(Db.LocalizationDataId.AnturaSpace_Custom_2, delegate() //dialog click customize
                         * {
                         *  //Not knowing how many object there are, register to all buttons
                         *  //foreach (var it in m_oItemsParentUI.GetComponentsInChildren<UnityEngine.UI.Button>())
                         *  //{
                         *  //   it.onClick.AddListener(AdvanceTutorial);
                         *  //}
                         *  m_oCustomizationButton.onClick.AddListener(AdvanceTutorial);
                         * });
                         */

                        /*RectTransform _oRectCustomB = m_oCustomizationButton.gameObject.GetComponent<RectTransform>();
                         * TutorialUI.ClickRepeat(m_oCameraUI.ScreenToWorldPoint(new Vector3(_oRectCustomB.position.x, _oRectCustomB.position.y, m_oCameraUI.nearClipPlane)), float.MaxValue, 1);
                         */
                        TutorialUI.ClickRepeat(m_oCustomizationButton.transform.position, float.MaxValue, 1);
                    });
                });


                break;

            case eAnturaSpaceTutoState.CUSTOMIZE:

                m_eTutoState = eAnturaSpaceTutoState.FINISH;

                TutorialUI.Clear(false);

                /*//Unregister from object buttons
                 * foreach (var it in m_oItemsParentUI.GetComponentsInChildren<UnityEngine.UI.Button>())
                 * {
                 *  it.onClick.RemoveListener(AdvanceTutorial);
                 * }*/
                m_oCustomizationButton.onClick.RemoveListener(AdvanceTutorial);

                GlobalUI.ShowBackButton(true, delegate() { NavigationManager.I.GoToScene(AppScene.Map); });

                AudioManager.I.StopDialogue(false);

                AudioManager.I.PlayDialog(Db.LocalizationDataId.Map_Intro_AnturaSpace, delegate()      //dialog go to map
                {
                    //TutorialUI.ClickRepeat(m_oCameraUI.ScreenToWorldPoint(new Vector3(GlobalUI.I.BackButton.RectT.position.x, GlobalUI.I.BackButton.RectT.position.y, m_oCameraUI.nearClipPlane)), float.MaxValue, 1);
                });

                break;

            default:
                break;
            }
        }
예제 #20
0
 public void OnUnlockAllRewards()
 {
     GlobalUI.ShowPrompt(true, "Unlock some rewards rewards?", GoUnlockAllRewards);
 }
예제 #21
0
        // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
        // ■■■ PUBLIC METHODS

        /// <summary>
        /// Call this to show/hide the continue screen.
        /// </summary>
        /// <param name="_onContinue">Eventual callback to call when the user clicks to continue</param>
        /// <param name="_mode">Mode</param>
        public static void Show(Action _onContinue, ContinueScreenMode _mode = ContinueScreenMode.ButtonWithBg)
        {
            GlobalUI.Init();
            GlobalUI.ContinueScreen.DoShow(_onContinue, _mode);
        }
예제 #22
0
 void Start()
 {
     NavigationManager.I.CurrentScene = AppScene.GameSelector;
     GlobalUI.ShowPauseMenu(false);
     GlobalUI.ShowBackButton(true, ExitThisScene);
 }