Ejemplo n.º 1
0
        public void Update(float _delta)
        {
            if (m_oGame.m_iAnturaTriggersIndex < m_oGame.m_afAnturaEnterTriggers.Length && M_oGameTime.Time <= m_oGame.m_afAnturaEnterTriggers[m_oGame.m_iAnturaTriggersIndex])
            {
                if (m_oGame.IsInIdle())
                {
                    ++m_oGame.m_iAnturaTriggersIndex;
                    m_oGame.m_oAntura.GetComponent <AnturaBehaviour>().EnterScene(m_oGame.m_fAnturaAnimDuration);
                    m_oGame.StartCoroutine(Utils.LaunchDelay(m_oGame.m_fAnturaAnimDuration / 6, m_oGame.m_oRoundManager.ShuffleLetters, m_oGame.m_fAnturaAnimDuration / 2));
                }
                else
                {
                    m_oGame.m_afAnturaEnterTriggers[m_oGame.m_iAnturaTriggersIndex] -= 3.0f;
                }
            }

            m_oGame.Context.GetOverlayWidget().SetClockTime(M_oGameTime.Time);


            if (!m_bHurryUpSfx)
            {
                if (M_oGameTime.Time < 4f)
                {
                    m_bHurryUpSfx = true;
                    //AudioManager.I.PlaySfx(Sfx.DangerClockLong);
                    timesUpAudioSource = m_oGame.Context.GetAudioManager().PlaySound(Sfx.DangerClockLong);
                }
            }

            M_oGameTime.Update(_delta);
        }
Ejemplo n.º 2
0
        public void ExitState()
        {
            m_oGame.m_oRoundManager.onAnswered -= OnRoundResult;

            AudioManager.I.StopMusic();

            M_oGameTime.Stop();
        }
Ejemplo n.º 3
0
        public void ExitState()
        {
            m_oGame.m_oRoundManager.onAnswered -= OnRoundResult;

            AudioManager.I.StopMusic();

            M_oGameTime.Stop();
            m_oGame.DisableRepeatPromptButton();
        }
Ejemplo n.º 4
0
        public void ExitState()
        {
            AudioManager.I.StopMusic();

            //AudioManager.I.StopSfx(Sfx.DangerClockLong);
            if (timesUpAudioSource != null)
            {
                timesUpAudioSource.Stop();
            }

            M_oGameTime.Stop();
        }
Ejemplo n.º 5
0
        public void Update(float _delta)
        {
            if (m_oGame.Difficulty > 0.66f && !m_oGame.m_AnturaTriggered && m_oGame.IsInIdle())
            {
                m_oGame.m_AnturaTriggered = true;
                m_oGame.m_oAntura.GetComponent <AnturaBehaviour>().EnterScene(m_oGame.m_fAnturaAnimDuration);
                m_oGame.StartCoroutine(Utils.LaunchDelay(m_oGame.m_fAnturaAnimDuration / 6, m_oGame.m_oRoundManager.ShuffleLetters, m_oGame.m_fAnturaAnimDuration / 2));
            }

            m_oGame.Context.GetOverlayWidget().SetClockTime(M_oGameTime.Time);

            M_oGameTime.Update(_delta);
        }
Ejemplo n.º 6
0
        public void EnterState()
        {
            m_oGame.m_oRoundManager.onAnswered += OnRoundResult;
            m_oGame.m_bIsTimesUp = false;
            m_oGame.ResetScore();

            M_oGameTime.Reset();
            M_oGameTime.Start();

            m_oGame.Context.GetOverlayWidget().Initialize(true, true, false);

            m_oGame.Context.GetOverlayWidget().SetStarsThresholds(m_oGame.STARS_1_THRESHOLD, m_oGame.STARS_2_THRESHOLD, m_oGame.STARS_3_THRESHOLD);
            m_oGame.Context.GetOverlayWidget().SetClockDuration(M_oGameTime.Duration);
            m_oGame.Context.GetOverlayWidget().SetClockTime(M_oGameTime.Time);

            m_oGame.m_oRoundManager.NewRound();
        }
Ejemplo n.º 7
0
        public void Update(float _delta)
        {
            if (m_oGame.m_iAnturaTriggersIndex < m_oGame.m_afAnturaEnterTriggers.Length && M_oGameTime.Time <= m_oGame.m_afAnturaEnterTriggers[m_oGame.m_iAnturaTriggersIndex])
            {
                if (m_oGame.IsInIdle())
                {
                    ++m_oGame.m_iAnturaTriggersIndex;
                    m_oGame.m_oAntura.GetComponent <AnturaBehaviour>().EnterScene(m_oGame.m_fAnturaAnimDuration);
                    m_oGame.StartCoroutine(Utils.LaunchDelay(m_oGame.m_fAnturaAnimDuration / 6, m_oGame.m_oRoundManager.ShuffleLetters, m_oGame.m_fAnturaAnimDuration / 2));
                }
                else
                {
                    m_oGame.m_afAnturaEnterTriggers[m_oGame.m_iAnturaTriggersIndex] -= 3.0f;
                }
            }

            m_oGame.Context.GetOverlayWidget().SetClockTime(M_oGameTime.Time);


            M_oGameTime.Update(_delta);
        }