Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     if (apiAiUnity != null)
     {
         apiAiUnity.Update();
     }
 }
Beispiel #2
0
 void Update()
 {
     if (apiaiClient != null)
     {
         apiaiClient.Update();
     }
 }
Beispiel #3
0
 void Update()
 {
     if (apiAiUnity != null)
     {
         apiAiUnity.Update();
     }
     // dispatch stuff on main thread
     while (ExecuteOnMainThread.Count > 0)
     {
         ExecuteOnMainThread.Dequeue().Invoke();
     }
 }
    void Update()
    {
        if (apiAiUnity != null)
        {
            apiAiUnity.Update();
        }

        while (ExecuteOnMainThread.Count > 0)
        {
            ExecuteOnMainThread.Dequeue().Invoke();
        }
    }
    void Update()
    {
        if (apiAiUnity != null)
        {
            apiAiUnity.Update();
        }
        // The player is grounded if a linecast to the groundcheck position hits anything on the ground layer.
        grounded = Physics2D.Linecast(transform.position, groundCheck.position, 1 << LayerMask.NameToLayer("Ground"));

        // If the jump button is pressed and the player is grounded then the player should jump.
        //if(Input.GetButtonDown("Jump") && grounded)
        if (speechInput == true && grounded)
        {
            jump = true;
        }
    }
Beispiel #6
0
    // Update is called once per frame
    void Update()
    {
        timer += Time.deltaTime;

        if (apiAiUnity != null)
        {
            apiAiUnity.Update();
        }

        // dispatch stuff on main thread
        while (ExecuteOnMainThread.Count > 0)
        {
            ExecuteOnMainThread.Dequeue().Invoke();
        }


        staminaBar.value -= 0.009f * Time.deltaTime;
    }
    // Update is called once per frame
    void Update()
    {
        if (apiAiUnity != null)
        {
            apiAiUnity.Update();
        }
        if (Input.GetKeyUp(KeyCode.Space))
        {
            recordingMode = !recordingMode;

            if (recordingMode)
            {
                Debug.Log("START RECORDING ");
                RecordingText.SetActive(true);
                StartListening();
            }
            else
            {
                Debug.Log("STOP RECORDING ");
                RecordingText.SetActive(false);
                StopListening();
            }
        }
    }