private void Start()
    {
        finalAnswerPrompt = GameObject.FindGameObjectWithTag("FinalAnswerStuff");

        if (finalAnswerPrompt != null)
        {
            finalAnswerPrompt.SetActive(false);
        }

        loadQuestion     = gameObject.AddComponent(typeof(LoadQuestions)) as LoadQuestions;
        scoreboardScript = gameObject.AddComponent(typeof(ScoreboardScript)) as ScoreboardScript;

        if (keywords != null)
        {
            if (recognizer == null)
            {
                recognizer = new KeywordRecognizer(keywords, confidence);
            }
            recognizer.OnPhraseRecognized += Recognizer_OnPhraseRecognized;
            recognizer.Start();
        }
        foreach (var device in Microphone.devices)
        {
            Debug.Log(device);
        }
    }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        scoreboard        = FindObjectOfType <ScoreboardScript>(); // create scoreboard
        cardselectionflag = 0;
        if (PlayerPrefs.HasKey("Hints"))
        {
            hintlimit = PlayerPrefs.GetInt("Hints");
        }
        else
        {
            hintlimit = 1;
        }
        if (PlayerPrefs.GetInt("Trait3") == 1)
        {
            hintlimit++;
        }
        hintflag     = 0;
        hintused     = 0;
        hintshowtime = 1.0f;
        shuffleflag  = 0;
        shuffleused  = 0;
        timer        = 0.0f;

        shuffleButton.onClick.AddListener(ShuffleBoard);
        hintButton.onClick.AddListener(Hint);
    }
Ejemplo n.º 3
0
 void Awake()
 {
     _pool       = GameObject.FindGameObjectWithTag("PoolManager").GetComponent <PoolManager>();
     _menu       = GameObject.FindGameObjectWithTag("Menu").GetComponent <MenuScript>();
     _background = GameObject.FindGameObjectWithTag("Background").GetComponent <BackgroundScript>();
     _spawn      = GameObject.FindGameObjectWithTag("Spawner").GetComponent <SpawnerScript>();
     _score      = GameObject.FindGameObjectWithTag("Scoreboard").GetComponent <ScoreboardScript>();
     _credit     = GameObject.FindGameObjectWithTag("Creditboard").GetComponent <CreditBoardScript>();
 }
Ejemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        speed  = Random.Range(5.0F, 10.0F);
        health = Random.Range(1, 4);
        sb     = GameObject.FindWithTag("Scoreboard").GetComponent <ScoreboardScript>();

        if (movementType == 1)
        {
            movementDir = Vector2.down;
        }
        else
        {
            // TODO implement different movement types
            movementDir = Vector2.down;
        }
    }
Ejemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        scoreboardScript = gameObject.AddComponent(typeof(ScoreboardScript)) as ScoreboardScript;
        questionText     = GameObject.Find("QuestionText").GetComponent <TMP_Text>();
        soundController.letsPlay();


        // Set the text
        allQuestions = loadQuestions();
        int randomNum = Random.Range(1, 500);

        questionLevel = 0;

        for (int i = 0; i < 15; i++)
        {
            fifteenQuestionArray.Add(allQuestions[randomNum]);
            randomNum = Random.Range(1, 500);
        }

        StartCoroutine(advanceToNextQuestion(3f));
    }
Ejemplo n.º 6
0
 private void Awake()
 {
     scoreboardScript = this;
 }