This repository has been archived by the owner on Jan 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Home
KevinBasener edited this page May 28, 2023
·
1 revision
- enum Difficulty {EASY, NORMAL, DIFFICULT}
- question: String
- answer_possibilities: Array[String]
- right_answer: int
- difficulty: Difficulty
The Question class is used too store a question, their answer possibilites and other relavant metrics.
- get_question(index: int, difficulty: Question.Difficulty): Question
- get_random_question(difficulty: Question.Difficulty): Question
- get_next_question(difficulty: Question.Difficulty): Question
The QuestionProvider class is used to provide the question objects. All questions should be accessed via the QuestionsProvider. You can use the QuestionsProvider by loading its resource using preload("res://resources/question_provider.tres")
- load_json_file(file_path: String): Dictionary
The JSONLoader class loads an json file and returns it as an dictionary, so it can be worked with in code.