Ejemplo n.º 1
0
    public void Continue()
    {
        Lessons [numToAdd].gameObject.SetActive(false);         // 10; 11;
        //Debug.Log ("Destroy - "+numToAdd.ToString());
        foreach (int i in randomList)
        {
            Debug.Log("Random Number " + i);
        }
        Debug.Log("Index of Random Number " + randomList.IndexOf(numToAdd));

        fpc.SetActive(true);
        DummyCamera.SetActive(false);
        BtnContinue.gameObject.SetActive(false);
        LockKeyParent.SetActive(true);
        LockKeyCount.SetActive(true);
        if (gemsCounter > 10)
        {
            //OnWin ();
            if (SceneManager.GetActiveScene().name == "SceneStudent")
            {
                StudentLevelQuiz();
            }
            if (SceneManager.GetActiveScene().name == "SceneEmployee")
            {
                EmployeeLevelQuiz();
            }
            if (SceneManager.GetActiveScene().name == "SceneEntreprenuer")
            {
                EntreprenuerLevelQuiz();
            }
        }
    }
Ejemplo n.º 2
0
    public void StudentLevelQuiz()
    {
        key   = 0;
        quote = "";
        MobileController.SetActive(false);
        LockKeyParent.SetActive(false);
        LockKeyCount.SetActive(false);

        KeyLockContainer.SetActive(true);
        key   = Random.Range(0, 11);
        quote = Lessons [key].GetComponentInChildren <Text>().text;

        keyQuote.text = "\" " + quote + " \"";
        Debug.Log(key);
        Debug.Log(quote);
        Debug.Log(randomList.IndexOf(key));
    }
Ejemplo n.º 3
0
    public void EntreprenuerLevelQuiz()
    {
        key   = 0;
        quote = "";

        MobileController.SetActive(false);
        LockKeyParent.SetActive(false);
        LockKeyCount.SetActive(false);

        KeyLockContainer.SetActive(true);
        key   = Random.Range(0, 11);
        quote = levelThree[key].ToLower();
        quoteImageEnt.GetComponent <Image>().sprite = quoteImageGroupEnt[key];

        keyQuote.text = "\" " + quote + " \"";
        Debug.Log(key);
        Debug.Log(quote);
        Debug.Log(randomList.IndexOf(key));
    }
Ejemplo n.º 4
0
    public void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.CompareTag("Gems"))
        {
            GetComponent <AudioSource> ().clip = GemClipSound;
            GetComponent <AudioSource> ().Play();

            Destroy(other.gameObject);
            fpc.SetActive(false);
            DummyCamera.SetActive(true);
            LockKeyParent.SetActive(false);
            LockKeyCount.SetActive(false);

            numToAdd = Random.Range(0, 11);
            //Debug.Log ("Generate - "+numToAdd.ToString());
            while (randomList.Contains(numToAdd))
            {
                numToAdd = Random.Range(0, 11);
                //Debug.Log ("While - "+numToAdd.ToString());
            }
            randomList.Add(numToAdd);

            Lessons [numToAdd].gameObject.SetActive(true);
            LockKey[gemsCounter].GetComponent <Image>().sprite = fillKey;
            gemsCounter++;              // 0; 1;

            BtnContinue.gameObject.SetActive(true);
        }
        else if (other.gameObject.CompareTag("TrophyTag"))
        {
            Destroy(other.gameObject);
            fpc.SetActive(false);
            DummyCamera.SetActive(true);
            Destroy(Path);

            Lessons [0].gameObject.SetActive(true);
        }
    }