Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEngine.UI;
- using System.Collections;
- public class Quiz : MonoBehaviour {
- public Text text;
- private enum States {room,question_0,question_1,question_2,question_3,question_4,question_5,question_6,question_7,question_8,question_9,wrong,won};
- private States myState;
- // Use this for initialization
- void Start () {
- myState = States.room;
- }
- // Update is called once per frame
- void Update () {
- print (myState);
- if (myState == States.room) {state_room ();}
- else if (myState == States.question_0) {state_question_0();}
- else if (myState == States.question_1) {state_question_1();}
- else if (myState == States.question_2) {state_question_2();}
- else if (myState == States.question_3) {state_question_3();}
- else if (myState == States.question_4) {state_question_4();}
- else if (myState == States.question_5) {state_question_5();}
- else if (myState == States.question_6) {state_question_6();}
- else if (myState == States.question_7) {state_question_7();}
- else if (myState == States.question_8) {state_question_8();}
- else if (myState == States.question_9) {state_question_9();}
- else if (myState == States.wrong) {state_wrong();}
- else if (myState == States.won) {state_won();}
- }
- void state_room () {
- text.text = "This is a Blockhead Quiz all questions will " +
- "be true or false type and it isnt gonna be easy. \n\n" +
- "Press T for True and F for False and S to Start";
- if (Input.GetKey(KeyCode.S)){myState = States.question_0;}
- }
- void state_question_0 () {
- text.text = "This is your first Question hence it is easy\n\n" +
- "To Spawn the Blockhead after your 3rd you need 150tc ?" ;
- if (Input.GetKey(KeyCode.F)){myState = States.question_1;}
- else if (Input.GetKey(KeyCode.T)){myState = States.wrong;}
- }
- void state_question_1 () {
- text.text = "Red COLOR is not very RARE among Tulips in Blockheads";
- if (Input.GetKey(KeyCode.F)){myState = States.wrong;}
- else if (Input.GetKey(KeyCode.T)){myState = States.question_2;}
- }
- void state_question_2 () {
- text.text = "The Ownership sing Protects an AREA of 35 by 35 blocks in all directions";
- if (Input.GetKey(KeyCode.T)){myState = States.wrong;}
- else if (Input.GetKey(KeyCode.F)){myState = States.question_3;}
- }
- void state_question_3 () {
- text.text = "The Ownership sing Protects an AREA of 35 by 35 blocks in all directions";
- if (Input.GetKey(KeyCode.T)){myState = States.wrong;}
- else if (Input.GetKey(KeyCode.F)){myState = States.question_4;}
- }
- void state_question_4 () {
- text.text = "The SHOP duping Glitch was remove in the 1.5 UPDATE";
- if (Input.GetKey(KeyCode.T)){myState = States.wrong;}
- else if (Input.GetKey(KeyCode.F)){myState = States.question_5;}
- }
- void state_question_5 () {
- text.text = "UNKNOWNS started to be popular in the 1.6 update";
- if (Input.GetKey(KeyCode.F)){myState = States.wrong;}
- else if (Input.GetKey(KeyCode.T)){myState = States.question_6;}
- }
- void state_question_6 () {
- text.text = "CLOUD servers were added in 1.5.2";
- if (Input.GetKey(KeyCode.F)){myState = States.wrong;}
- else if (Input.GetKey(KeyCode.T)){myState = States.question_7;}
- }
- void state_question_7 () {
- text.text = "Kelp was added in 1.3";
- if (Input.GetKey(KeyCode.T)){myState = States.wrong;}
- else if (Input.GetKey(KeyCode.F)){myState = States.question_8;}
- }
- void state_question_8 () {
- text.text = "Credit of 30 days cost $8.99";
- if (Input.GetKey(KeyCode.F)){myState = States.wrong;}
- else if (Input.GetKey(KeyCode.T)){myState = States.question_9;}
- }
- void state_question_9 () {
- text.text = "You got 9 Questions right think u can answer this\n\n " +
- "FISHES were there from the first update of blockheads?" ;
- if (Input.GetKey(KeyCode.T)){myState = States.wrong;}
- else if (Input.GetKey(KeyCode.F)){myState = States.won;}
- }
- void state_wrong () {
- text.text = "Oooooooo.......... it looks like you have answered wrong, Please think of donating Mgnc.\n\n" +
- "This is made by May3333. \n\n" +
- "if u wanna play again the PRESS R";
- if (Input.GetKey(KeyCode.R)){myState = States.room;}
- }
- void state_won () {
- text.text = "Wow............you answered all my questions kewl..\n\n" +
- "PLEASE THINK OF DONATING MGNC \n\n" +
- "TO BUY THE CODE CONTACT ME" +
- "MADE BY MAY3333";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement