/// <summary> /// Shows /// </summary> private void EndQuestion() { // End the round for this question ShowTrivia(); ActiveQuestion = null; }
public static void CreateMyAsset() { QuestionSO asset = ScriptableObject.CreateInstance <QuestionSO>(); AssetDatabase.CreateAsset(asset, "Assets/QuestionSO.asset"); AssetDatabase.SaveAssets(); EditorUtility.FocusProjectWindow(); Selection.activeObject = asset; }
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(); }
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(); }
/// <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; }