public void EnterState() { game.antura.AllowSitting = false; game.isTimesUp = false; game.circleBox.SetActive(true); box = game.circleBox.GetComponent <CircleButtonBox>(); box.Clear(); box.ImageMode = true; correct = game.CurrentQuestion.GetCorrectAnswers().First(); var wrongs = game.CurrentQuestion.GetWrongAnswers(); var choices = new List <ILivingLetterData>(); int maxWrongs = Mathf.RoundToInt(2 + 4 * ReadingGameConfiguration.Instance.Difficulty); choices.AddRange(wrongs); for (int i = maxWrongs, count = choices.Count; i < count; ++i) { choices.RemoveAt(choices.Count - 1); } choices.Add(correct); choices.Shuffle(); float delay = 0; foreach (var c in choices) { var button = box.AddButton(c, OnAnswered, delay); delay += 0.2f; if (c == correct) { correctButton = button; } } box.Active = true; if (!TutorialMode) { game.radialWidget.Show(); game.radialWidget.Reset(ReadTime / MaxTime); game.radialWidget.inFront = true; game.radialWidget.pulsing = true; } }
public void EnterState() { Finished = false; game.antura.AllowSitting = false; game.isTimesUp = false; gameTime.Reset(game.TimeToAnswer); if (!TutorialMode) { countdownCo = game.StartCoroutine(CountdownSFXCO()); } game.circleBox.SetActive(true); box = game.circleBox.GetComponent <CircleButtonBox>(); box.Clear(); correctLLData = game.CurrentQuestion.GetCorrectAnswers().First(); var wrongs = game.CurrentQuestion.GetWrongAnswers(); var choices = new List <ILivingLetterData>(); // Difficulty for game type ReadAndListen int maxWrongs = Mathf.RoundToInt(2 + 3 * game.Difficulty); choices.AddRange(wrongs); for (int i = maxWrongs, count = choices.Count; i < count; ++i) { choices.RemoveAt(choices.Count - 1); } choices.Add(correctLLData); choices.Shuffle(); float delay = 0; foreach (var c in choices) { var imageData = new LL_ImageData(c.Id); var button = box.AddButton(imageData, OnAnswered, delay); delay += 0.2f; if (c == correctLLData) { correctButton = button; } } box.Active = true; if (!TutorialMode) { if (showOldTimer) { game.radialWidget.Show(); game.radialWidget.Reset(ReadTime / MaxTime); game.radialWidget.inFront = true; game.radialWidget.pulsing = true; } gameTime.Start(); } if (ReadingGameConfiguration.Instance.CurrentGameType == ReadingGameConfiguration.GameType.ReadAndListen) { game.EnableRepeatPromptButton(); } }