Example #1
0
    private void Start()
    {
        //Setting up the library
        _speechRecognition = SpeechRecognitionModule.Instance;
        _speechRecognition.SpeechRecognizedSuccessEvent += SpeechRecognizedSuccessEventHandler;
        _speechRecognition.SpeechRecognizedFailedEvent  += SpeechRecognizedFailedEventHandler;

        //Pause the game
        TimeControl.PauseGame();

        //Set the listener to buttons
        record.onClick.AddListener(StartRecordButtonOnClickHandler);
        stop.onClick.AddListener(StopRecordButtonOnClickHandler);

        //Set the initial chances
        remainig = 3;
        remainingAttempts.text = remainig.ToString();
    }