void Start() { AdManager.instance.gamesPlayed++; SoundStatus(); score = 0; //at start we want score to be zero hiScore = PlayerPrefs.GetInt("HiScore"); //we get the saved hiscore timePerQues = 4; //we set max time for question buttonClicked = false; //at start the player input is nothing isGameOver = false; //at start the game is not over audioSource = GetComponent <AudioSource>(); // we get the component attached to game object //at start we need to add xml data to questions array QuestionsContainer qc = QuestionsContainer.Load(path); questions = qc.questionsList.ToArray(); //we store data from questionList into questions array SetCurrentQuestion(); //we call the question setting method }
private void Start() { QuestionsContainer qc = QuestionsContainer.Load(path); quests = qc.questionsList; }