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); }
public void ExitState() { m_oGame.m_oRoundManager.onAnswered -= OnRoundResult; AudioManager.I.StopMusic(); M_oGameTime.Stop(); }
public void ExitState() { m_oGame.m_oRoundManager.onAnswered -= OnRoundResult; AudioManager.I.StopMusic(); M_oGameTime.Stop(); m_oGame.DisableRepeatPromptButton(); }
public void ExitState() { AudioManager.I.StopMusic(); //AudioManager.I.StopSfx(Sfx.DangerClockLong); if (timesUpAudioSource != null) { timesUpAudioSource.Stop(); } M_oGameTime.Stop(); }
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); }
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(); }
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); }