Example #1
0
        /// <summary>
        /// Shows
        /// </summary>
        private void EndQuestion()
        {
            // End the round for this question
            ShowTrivia();

            ActiveQuestion = null;
        }
Example #2
0
        public static void CreateMyAsset()
        {
            QuestionSO asset = ScriptableObject.CreateInstance <QuestionSO>();

            AssetDatabase.CreateAsset(asset, "Assets/QuestionSO.asset");
            AssetDatabase.SaveAssets();

            EditorUtility.FocusProjectWindow();

            Selection.activeObject = asset;
        }
Example #3
0
        private void PickQuestion()
        {
            // Select an integer in the range of available questions
            int pick = Random.Range(0, questionsGrade3EnglishEasy.Count);

            // Pick it from the list
            ActiveQuestion = questionsGrade3EnglishEasy[pick];

            // Remove it so it won't get picked again during this game.
            questionsGrade3EnglishEasy.RemoveAt(pick);

            ShowQuestion();
        }
Example #4
0
        private void PickQuestion()
        {
            // Select an integer in the range of available questions
            int pick = Random.Range(0, QuestionTimeAttack.Count);

            // Pick it from the list
            ActiveQuestion = QuestionTimeAttack[pick];

            // Remove it so it won't get picked again during this game.
            QuestionTimeAttack.RemoveAt(pick);

            ShowQuestion();
        }
Example #5
0
        /// <summary>
        /// Called if the clicked answer was correct
        /// </summary>
        private void Correct()
        {
            NextQuestionButton.gameObject.SetActive(true);
            EndGameButton.gameObject.SetActive(false);

            // Add points to player
            score          += 10;
            PointsText.text = "Score: " + score;

            // Update points

            ShowTrivia();

            ActiveQuestion = null;
        }