public void StartGame(int categoryIndex) { questions = new List <Pregunta>(); dataScriptable = quizDataList[categoryIndex]; questions.AddRange(dataScriptable.questions); SelectQuestion(); gameStatus = StatusJuego.PLAYING; }
/// <summary> /// Method called to check the answer is correct or not /// </summary> /// <param name="selectedOption">answer string</param> /// <returns></returns> public bool Answer(string selectedOption) { bool correct = false; if (gameStatus == StatusJuego.PLAYING) { if (questions.Count > 0) { Invoke("SelectQuestion", 0.4f); } else { gameStatus = StatusJuego.NEXT; } } return(correct); }