Updated trivia
This commit is contained in:
1 parent
9781bd6190
commit
68c8cbba1d
1 file changed
+167
-2
@@ -27,6 +27,172 @@ namespace InterfaceOff
|
||||
|
||||
public class TriviaWindow : WindowBase
|
||||
{
|
||||
private const string DUMP = @"{
|
||||
""questions"": [
|
||||
{
|
||||
""question"": ""2 + 2 ="",
|
||||
""choices"": [
|
||||
""3"",
|
||||
""4"",
|
||||
""5"",
|
||||
""6""
|
||||
],
|
||||
""answer"": ""4""
|
||||
},
|
||||
{
|
||||
""question"": ""How many sides does an octagon have?"",
|
||||
""choices"": [
|
||||
""45"",
|
||||
""8"",
|
||||
""4"",
|
||||
""5""
|
||||
],
|
||||
""answer"": ""8""
|
||||
},
|
||||
{
|
||||
""question"": ""How many stripes are on the US Flag?"",
|
||||
""choices"": [
|
||||
""0"",
|
||||
""12"",
|
||||
""13"",
|
||||
""14""
|
||||
],
|
||||
""answer"": ""13""
|
||||
},
|
||||
{
|
||||
""question"": ""What city do The Beatles come from?"",
|
||||
""choices"": [
|
||||
""London"",
|
||||
""Manchester"",
|
||||
""Liverpool"",
|
||||
""Bristol""
|
||||
],
|
||||
""answer"": ""Liverpool""
|
||||
},
|
||||
{
|
||||
""question"": ""Who is the Roman God of love?"",
|
||||
""choices"": [
|
||||
""Athena"",
|
||||
""Zeus"",
|
||||
""Cupid"",
|
||||
""Hermes""
|
||||
],
|
||||
""answer"": ""Cupid""
|
||||
},
|
||||
{
|
||||
""question"": ""What is the largest lake in Scotland?"",
|
||||
""choices"": [
|
||||
""Michigan"",
|
||||
""Loch Lomond"",
|
||||
""Lake Superior"",
|
||||
""Loot Lake""
|
||||
],
|
||||
""answer"": ""Loch Lomond""
|
||||
},
|
||||
{
|
||||
""question"": ""What is the capital of Peru?"",
|
||||
""choices"": [
|
||||
""Lima"",
|
||||
""Argentina"",
|
||||
""Mozambique"",
|
||||
""Mozart""
|
||||
],
|
||||
""answer"": ""Lima""
|
||||
},
|
||||
{
|
||||
""question"": ""How many Queens have ruled France?"",
|
||||
""choices"": [
|
||||
""53 1/2"",
|
||||
""Unknown"",
|
||||
""None"",
|
||||
""1""
|
||||
],
|
||||
""answer"": ""None""
|
||||
},
|
||||
{
|
||||
""question"": ""What colour is a banana?"",
|
||||
""choices"": [
|
||||
""Yellow"",
|
||||
""Chimera"",
|
||||
""Green"",
|
||||
""Purple""
|
||||
],
|
||||
""answer"":""Yellow""
|
||||
},
|
||||
{
|
||||
""question"": ""How many oceans are there?"",
|
||||
""choices"": [
|
||||
""None"",
|
||||
""Three"",
|
||||
""Disputed"",
|
||||
""Twenty-two""
|
||||
],
|
||||
""answer"": ""Disputed""
|
||||
},
|
||||
{
|
||||
""question"": ""What colour is grass?"",
|
||||
""choices"": [
|
||||
""Banana"",
|
||||
""Purple"",
|
||||
""Green"",
|
||||
""Sky Blue""
|
||||
],
|
||||
""answer"": ""Green""
|
||||
},
|
||||
{
|
||||
""question"": ""What number is after 8?"",
|
||||
""choices"": [
|
||||
""69"",
|
||||
""9"",
|
||||
""0b0001101"",
|
||||
""7""
|
||||
],
|
||||
""answer"": ""9""
|
||||
},
|
||||
{
|
||||
""question"": ""Main Ingredient of Bread?"",
|
||||
""choices"": [
|
||||
""Flour / Wheat"",
|
||||
""Uranium"",
|
||||
""Cyanide"",
|
||||
""Ricin""
|
||||
],
|
||||
""answer"": ""Flour""
|
||||
},
|
||||
{
|
||||
""question"": ""How many pyramids are there in Egypt?"",
|
||||
""choices"": [
|
||||
""None they are all a lie"",
|
||||
""138"",
|
||||
""420"",
|
||||
""Over 9000!!!!""
|
||||
],
|
||||
""answer"": ""138""
|
||||
},
|
||||
{
|
||||
""question"": ""How many eyes do a Hornet have?"",
|
||||
""choices"": [
|
||||
""5"",
|
||||
""No Eyes"",
|
||||
""21"",
|
||||
""8""
|
||||
],
|
||||
""answer"": ""5""
|
||||
},
|
||||
{
|
||||
""question"": ""What kind of drink is soda?"",
|
||||
""choices"": [
|
||||
""Undrinkable"",
|
||||
""Lave"",
|
||||
""Soft Drink"",
|
||||
""Food""
|
||||
],
|
||||
""answer"": ""Soft Drink""
|
||||
}
|
||||
]
|
||||
}
|
||||
";
|
||||
|
||||
private static TriviaSet Trivia;
|
||||
|
||||
private static Vector2[] Positions { get; } =
|
||||
@@ -40,8 +206,7 @@ namespace InterfaceOff
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void LoadTriviaSet()
|
||||
{
|
||||
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);
|
||||
Trivia = JsonUtility.FromJson<TriviaSet>(DUMP);
|
||||
}
|
||||
|
||||
protected override void OnWindowInstantiation()
|
||||
|
||||
Reference in new issue
Block a user