예제 #1
0
 private void Update()
 {
     if (hasPermissions)
     {
         hasPermissions = false;
         StartCoroutine(FadeToAlpha(TEXT_FADE_TIME, PermissionsWaitText));
         StartCoroutine(FadeToAlpha(TEXT_FADE_TIME, PermissionsDeniedText));
         StartCoroutine(UnfadeFromAlpha(TEXT_FADE_TIME, IntroductionText));
         voiceControllerInterface = GetComponentInChildren <VoiceControllerInterface>();  // initializing voice recognizer
         voiceControllerInterface.StartListening();
     }
 }
예제 #2
0
    private void Start()
    {
        LoadingScreen.enabled = false;                                               // no loading at the beginning

        TextAsset targetLabelsResource = Resources.Load <TextAsset>("TargetLabels"); // loading target labels

        targetLabels = new List <string>(targetLabelsResource.text.ToLower().Split(new[] { "\r\n", "\r" }, System.StringSplitOptions.None));

        TARGET_SPAWN_CIRCLE_RADIUS = CalculateTargetSpawnCircleRadius();  // calculating spawn circle radius based on the display dimensions
        SpawnRandomTarget();

        voiceControllerInterface = GetComponentInChildren <VoiceControllerInterface>();  // initializing voice recognizer
        voiceControllerInterface.StartListening();
    }
예제 #3
0
    private void Start()
    {
        LoadingScreen.enabled = false;                                                  // no loading visible at the start

        voiceControllerInterface = GetComponentInChildren <VoiceControllerInterface>(); // initialize voice recognizer interface

        spawner.transform.localPosition = new Vector3(                                  // move the spawner to the proper position
            TARGETS_PATH_RADIUS,
            0.0f,
            1.0f
            );

        SetIndicatorColor(colors[Random.Range(0, colors.Length)]); // give it first color

        voiceControllerInterface.StartListening();                 // start listening for commands
    }
예제 #4
0
    private void Start()
    {
        LoadingScreen.enabled = false;                                                  // no loading screen visible at the start

        PrepareTargetLabels();                                                          // load the labels from resources

        voiceControllerInterface = GetComponentInChildren <VoiceControllerInterface>(); // initialize voice controller interface

        GetComponentsInChildren(paths);                                                 // load all the paths
        currentPath = 0;

        target = GetComponentInChildren <FollowThePathTargetBehaviour>();  // initialize the target
        target.SetPathCreator(paths[currentPath]);
        target.StartRunning();

        waitingToShowNewLabel = true;
    }
예제 #5
0
 private void Start()
 {
     LoadingScreen.enabled    = false;                                               // no loading at the beginning
     voiceControllerInterface = GetComponentInChildren <VoiceControllerInterface>(); // initializing voice recognizer
     voiceControllerInterface.StartListening();
 }