Made trivia hard coded
This commit is contained in:
1 parent
96082f64b4
commit
c4211494a3
4 files changed
+1
-968
No files matched your search
@@ -41,9 +41,7 @@ namespace InterfaceOff
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void LoadTriviaSet()
|
||||
{
|
||||
string path = Application.streamingAssetsPath + "/Trivia.json";
|
||||
string json = File.ReadAllText(path);
|
||||
|
||||
const string json = "{\n \"questions\" : [\n {\n \"question\" : \"2 + 2?\",\n \"choices\" : [\n \"3\",\n \"4\",\n \"5\",\n \"6\"\n ],\n \"answer\" : \"4\"\n },\n {\n \"question\" : \"What is the capital of France?\",\n \"choices\" : [\n \"Paris\",\n \"Rome\",\n \"Berlin\",\n \"Madrid\"\n ],\n \"answer\" : \"Paris\"\n },\n {\n \"question\" : \"What color is the sky?\",\n \"choices\" : [\n \"Blue\",\n \"Green\",\n \"Red\",\n \"Yellow\"\n ],\n \"answer\" : \"Blue\"\n },\n {\n \"question\" : \"What color is grass?\",\n \"choices\" : [\n \"Green\",\n \"Blue\",\n \"Red\",\n \"White\"\n ],\n \"answer\" : \"Green\"\n },\n {\n \"question\" : \"What is the opposite of hot?\",\n \"choices\" : [\n \"Cold\",\n \"Warm\",\n \"Dry\",\n \"Wet\"\n ],\n \"answer\" : \"Cold\"\n },\n {\n \"question\" : \"Which direction does the sun rise?\",\n \"choices\" : [\n \"East\",\n \"West\",\n \"North\",\n \"South\"\n ],\n \"answer\" : \"East\"\n },\n {\n \"question\" : \"How many days are there in a week?\",\n \"choices\" : [\n \"5\",\n \"6\",\n \"7\",\n \"8\"\n ],\n \"answer\" : \"7\"\n },\n {\n \"question\" : \"How many hours are there in a day?\",\n \"choices\" : [\n \"12\",\n \"18\",\n \"24\",\n \"36\"\n ],\n \"answer\" : \"24\"\n },\n {\n \"question\" : \"How many letters are in the alphabet?\",\n \"choices\" : [\n \"24\",\n \"25\",\n \"26\",\n \"27\"\n ],\n \"answer\" : \"26\"\n },\n {\n \"question\" : \"Earth is a?\",\n \"choices\" : [\n \"Star\",\n \"Planet\",\n \"Moon\",\n \"Comet\"\n ],\n \"answer\" : \"Planet\"\n },\n {\n \"question\" : \"What is the largest planet in the solar system?\",\n \"choices\" : [\n \"Earth\",\n \"Mars\",\n \"Jupiter\",\n \"Venus\"\n ],\n \"answer\" : \"Jupiter\"\n },\n {\n \"question\" : \"Which number is the smallest?\",\n \"choices\" : [\n \"1\",\n \"-5\",\n \"10\",\n \"-100\"\n ],\n \"answer\" : \"-100\"\n },\n {\n \"question\" : \"What is the opposite of up?\",\n \"choices\" : [\n \"Down\",\n \"Left\",\n \"Right\",\n \"Around\"\n ],\n \"answer\" : \"Down\"\n },\n {\n \"question\" : \"What temperature does water freeze at?\",\n \"choices\" : [\n \"0°C\",\n \"50°C\",\n \"100°C\",\n \"10°C\"\n ],\n \"answer\" : \"0°C\"\n },\n {\n \"question\" : \"What is the fastest land animal?\",\n \"choices\" : [\n \"Dog\",\n \"Horse\",\n \"Cheetah\",\n \"Cat\"\n ],\n \"answer\" : \"Cheetah\"\n },\n {\n \"question\" : \"What do humans breathe?\",\n \"choices\" : [\n \"Oxygen\",\n \"Carbon\",\n \"Helium\",\n \"Smoke\"\n ],\n \"answer\" : \"Oxygen\"\n },\n {\n \"question\" : \"What shape has 3 sides?\",\n \"choices\" : [\n \"Square\",\n \"Triangle\",\n \"Circle\",\n \"Oval\"\n ],\n \"answer\" : \"Triangle\"\n },\n {\n \"question\" : \"What shape has 4 sides?\",\n \"choices\" : [\n \"Triangle\",\n \"Square\",\n \"Circle\",\n \"Star\"\n ],\n \"answer\" : \"Square\"\n },\n {\n \"question\" : \"W
Line truncated
|
||||
Trivia = JsonUtility.FromJson<TriviaSet>(json);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user