// Use this for initialization void Start() { finishing = false; switch (difficulty) { case Difficulty.normal: timeToLose = timeToLoseNormal; break; case Difficulty.hard: timeToLose = timeToLoseHard; break; default: break; } oldPosition = transform.position; finished = true; discusionSound = GetComponent <AudioSource>(); GameData gameData = ObjectsFactory.getGameData(textAsset.text); problems = gameData.problems; int n = problems.Length; while (n > 1) { int k = Random.Range(0, n--); ProblemModel temp = problems[n]; problems[n] = problems[k]; problems[k] = temp; } foreach (QuestionModel question in gameData.questions) { questions.Add(question.id, question); } hideIntroTime = Time.time + 15; questionText.text = IntroText; answerButtons.SetActive(false); }