Ejemplo n.º 1
0
        private void Update()
        {
            if (m_Laught == true)
            {
                StartCoroutine(m_GirlCharacter.PlayHappyAnimation());
                m_Laught = false;
            }

            if (m_StartTalking == true)
            {
                m_GirlCharacter.StartTalkingAnimation();
                m_StartTalking = false;
            }

            if (m_StopTalking == true)
            {
                m_GirlCharacter.StopTalkingAnimation();
                m_StopTalking = false;
            }

            if (m_Angry == true)
            {
                StartCoroutine(m_GirlCharacter.PlayVictoryAnimation());
                m_Angry = false;
            }

            if (m_Looser == true)
            {
                StartCoroutine(m_GirlCharacter.PlayLoseAnimation());
                m_Looser = false;
            }
        }
Ejemplo n.º 2
0
        // PRIVATE METHODS

        private IEnumerator OnAtractivityAchieved(int atractivity)
        {
            m_BoyCharacter.CanMove = false;
            m_GirlCharacter.SetInactive();


            if (atractivity >= m_GoalAtractivity)
            {
                m_BoyCharacter.PlayVictoryAnimation();
                yield return(m_GirlCharacter.PlayHappyAnimation());

                m_EndScreen.SetActive(true);
                m_EndScreen.PlayGoodEnding();
            }
            else
            {
                m_BoyCharacter.PlayLoseAnimation();
                yield return(m_GirlCharacter.PlayLoseAnimation());

                m_EndScreen.SetActive(true);
                m_EndScreen.PlayBadEnding();
            }

            while (m_EndScreen.IsFinished == false)
            {
                yield return(null);
            }

            m_IsFinished = true;
        }