Example #1
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        if (input == "CPEParty2017")
        {
            Code4.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge3.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Example #2
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        string input2 = input.ToLower();  //changes made\\

        if (input2 == "matlab")           //changes made
        {
            QnA4.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge5.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Example #3
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        input   = input.ToLower();
        Answer  = Answer.ToLower();
        if (input == Answer || input == Answer)
        {
            Q2.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge1.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Example #4
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        if (input == "Power Supply" || input == "Power supply" || input == "power supply")
        {
            Ram.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge2.gameObject.SetActive(true);
            ID.gameObject.SetActive(false);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Example #5
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        if (input == "IC" || input == "Integrated circuit" || input == "Integrated Circuit" || input == "integrated circuit" || input == "Piste")
        {
            Ic.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge2.gameObject.SetActive(true);
            ID.gameObject.SetActive(false);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Example #6
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        if (input == "Big mac" || input == "Big Mac" || input == "big mac" || input == "big Mac" || input == "A big mac" || input == "A Big Mac")
        {
            RQ3.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge5.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Example #7
0
    public void GetInput()
    {
        string input = iF.text;
        int    number;

        iF.text = "";
        if (Int32.TryParse(input, out number) && int.Parse(input) == 104)
        {
            //	Debug.Log (DateTime.Now + " " + DateTime.);
            Q1.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge1.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }


        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Example #8
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        if (input == "Random Number" || input == "Garbage" || input == "Unknown value" || input == "Random number" || input == "Unknown value" || input == "Unknown")
        {
            Code2.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge3.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Example #9
0
    public void GetInput()
    {
        string input = iF.text;

        iF.text = "";
        if (input == "Eagle CAD" || input == "Eagle Cad" || input == "Eagle cad" || input == "eagle cad")
        {
            SQ3.gameObject.SetActive(false);
            BlackFadeQ.gameObject.SetActive(false);
            BlackFade.gameObject.SetActive(true);
            Success.gameObject.SetActive(true);
            Badge6.gameObject.SetActive(true);
        }
        else
        {
            Debug.Log("FAILURE");
            BlackFade.gameObject.SetActive(true);
            Fail.gameObject.SetActive(true);
        }

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Success.gameObject.SetActive(false);
                Fail.gameObject.SetActive(false);
            }
        });
    }
Example #10
0
    // Update is called once per frame
    void Update()
    {
        Okay.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                Okay.gameObject.SetActive(false);
                BlackFade.gameObject.SetActive(true);
                Question.gameObject.SetActive(true);
                Canvas.gameObject.SetActive(false);
            }
        });

        BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
            if (click)
            {
                BlackFade.gameObject.SetActive(false);
                Question.gameObject.SetActive(false);
            }
        });
    }
Example #11
0
        // Update is called once per frame
        void Update()
        {
            Okay.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    BlackFadeU.gameObject.SetActive(true);
                    Confirm.gameObject.SetActive(true);
                    Yes.gameObject.SetActive(true);
                    No.gameObject.SetActive(true);
                }
            });

            Yes.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    BlackFadeU.gameObject.SetActive(false);
                    BlackFade.gameObject.SetActive(true);
                    Success.gameObject.SetActive(true);
                    Confirm.gameObject.SetActive(false);
                    Yes.gameObject.SetActive(false);
                    No.gameObject.SetActive(false);

                    B1.gameObject.SetActive(false);
                    B2.gameObject.SetActive(false);
                    B3.gameObject.SetActive(false);
                    B4.gameObject.SetActive(false);
                    B5.gameObject.SetActive(false);
                    B6.gameObject.SetActive(false);
                    I1.gameObject.SetActive(false);
                    I2.gameObject.SetActive(false);
                    I3.gameObject.SetActive(false);
                    S1.gameObject.SetActive(false);
                    S2.gameObject.SetActive(false);
                    S3.gameObject.SetActive(false);

                    PlayerPrefs.DeleteKey("Badge1");
                    PlayerPrefs.DeleteKey("Badge2");
                    PlayerPrefs.DeleteKey("Badge3");
                    PlayerPrefs.DeleteKey("Badge4");
                    PlayerPrefs.DeleteKey("Badge5");
                    PlayerPrefs.DeleteKey("Badge6");

                    PlayerPrefs.DeleteKey("ID1");
                    PlayerPrefs.DeleteKey("ID2");
                    PlayerPrefs.DeleteKey("ID3");

                    PlayerPrefs.DeleteKey("Secret1");
                    PlayerPrefs.DeleteKey("Secret2");
                    PlayerPrefs.DeleteKey("Secret3");
                }
            });

            No.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    BlackFadeU.gameObject.SetActive(false);
                    BlackFade.gameObject.SetActive(false);
                    Confirm.gameObject.SetActive(false);
                    Yes.gameObject.SetActive(false);
                    No.gameObject.SetActive(false);
                }
            });

            BlackFade.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    BlackFadeU.gameObject.SetActive(false);
                    BlackFade.gameObject.SetActive(false);
                    Success.gameObject.SetActive(false);
                }
            });
        }