private void InitTutorialLetter()
        {
            m_LetterObjectView = m_TutorialLetter.GetComponent <LetterObjectView>();

            m_TMPTextColoringLetter = m_TutorialLetter.GetComponent <TMPTextColoring>();
            m_SurfaceColoringLetter = m_TutorialLetter.GetComponent <SurfaceColoring>();

            m_LLController = m_TutorialLetter.GetComponent <ColorTickle_LLController>();
            m_LLController.movingToDestination = true;

            m_HitStateLLController                 = m_TutorialLetter.GetComponent <HitStateLLController>();
            m_HitStateLLController.LoseLife       += LoseLife;
            m_HitStateLLController.EnableTutorial += EnableTutorialAnimation;

            SetBrushColor(new Color(255, 0, 0, 255));

            DisableLetterComponents();

            //m_LLController.OnDestinationReached += EnableTutorialAnimation;

            m_LLController.OnDestinationReached += delegate()
                                                   //play intro dialogue
            {
                game.Context.GetAudioManager().PlayDialogue(Db.LocalizationDataId.ColorTickle_Intro, delegate()
                                                            //play tutorial dialogue on intro finish
                {
                    game.Context.GetAudioManager().PlayDialogue(Db.LocalizationDataId.ColorTickle_Tuto); //for now this is broken, COLORTICKLE_TUTO is repeated like a loop
                    // HACK stop audio and replay music
                    //game.Context.GetAudioManager().PlayDialogue(Db.LocalizationDataId.ColorTickle_Tuto, delegate() { game.Context.GetAudioManager().StopMusic(); game.Context.GetAudioManager().PlayMusic(game.backgroundMusic); });

                    EnableLetterComponents();
                    EnableTutorialAnimation();
                });
            };
        }
Ejemplo n.º 2
0
        private void InitLetter()
        {
            m_LetterObjectView = m_CurrentLetter.GetComponent <LetterObjectView>();

            m_TMPTextColoringLetter = m_CurrentLetter.GetComponent <TMPTextColoring>();
            m_SurfaceColoringLetter = m_CurrentLetter.GetComponent <SurfaceColoring>();

            m_LLController = m_CurrentLetter.GetComponent <ColorTickle_LLController>();
            m_LLController.movingToDestination = true;

            m_HitStateLLController           = m_CurrentLetter.GetComponent <HitStateLLController>();
            m_HitStateLLController.LoseLife += LoseLife;

            m_LLController.OnDestinationReached += delegate() { AudioManager.I.PlayLetter(m_LetterObjectView.Data.Id); }; //play audio on destination


            m_HitStateLLController.EnableAntura += EnableAntura;
            //game.anturaController.targetToLook = m_CurrentLetter.transform; //make antura look at the LL on rotations

            SetBrushColor(m_ColorsUIManager.defaultColor);
        }