public void OnSelectResponse(QuizPanelMCItem item, MultipleChoiceQuizMinigameDriver driver) { driver.AttemptsTried++; if (item.Response.IsCorrect) { driver.CorrectAnswer(); OnResponseCorrect(item, driver); } else { driver.IncorrectAnswer(); OnResponseWrong(item, driver); } if (item.Response.Event != null && item.Response.Event.Count() > 0) { foreach (var e in item.Response.Event) { driver.TaskDriver.ActivationContext.FireEvent(e); } } }
public void OnResponseWrong(QuizPanelMCItem item, MultipleChoiceQuizMinigameDriver driver) { item.SetCanSelect(false); if (driver.Quiz.MaximumAttempts > 0 && driver.AttemptsTried >= driver.Quiz.MaximumAttempts) { OnAttemptsExhausted(driver); } }
public void OnResponseCorrect(QuizPanelMCItem item, MultipleChoiceQuizMinigameDriver driver) { PushSuccessPanel(driver.TaskDriver); }