void LateUpdate() { //Check objects look time if (convStateIndex >= 0 && possibleConvStates [convStateIndex].currInvestorState >= -1 && possibleConvStates [convStateIndex].currInvestorAudioState != -2) { totalTimeTalking += Time.deltaTime; if (possibleConvStates [convStateIndex].currInvestorState >= 0) { totalTimeUserTalking += Time.deltaTime; if (HoloToolkit.Unity.GazeManager.Instance.IsFocusedObjectTag("TextToSay")) { scriptLookTime += Time.deltaTime; } } if (HoloToolkit.Unity.GazeManager.Instance.IsFocusedObjectTag("InvestorFace")) { investorFaceLookTime += Time.deltaTime; } if (possibleConvStates [convStateIndex].currInvestorState >= 0 && !microphoneManager.IsUserTalking() && !HoloToolkit.Unity.GazeManager.Instance.IsFocusedObjectTag("TextToSay") && !HoloToolkit.Unity.GazeManager.Instance.IsFocusedObjectTag("InvestorFace") && !IsInvoking() && nextStateAfterAnimCoroutine == null && !InvestorCommunicator.Instance.IsRecordedAudioPlaying() && !HoloToolkit.Unity.GazeManager.Instance.IsFocusedObjectTag("UI")) { investorDoesNotLookTime += Time.deltaTime; } else { investorDoesNotLookTime = 0; } if (investorDoesNotLookTime >= IDLE_WAIT_TIME && !microphoneManager.IsUserTalking() && !IsInvoking() && nextStateAfterAnimCoroutine == null && !InvestorCommunicator.Instance.IsRecordedAudioPlaying()) { investorDoesNotLookTime = 0; GoState(possibleConvStates.Count - 1); } //**********DEBUG************ //debug.text = "Memorization " + GetMemorization () + " " + "Contact " + GetEyeContact (); //*************************** } }