public void CloseInputWindow() { // update the window state. inputWindow = InputWindowState.Closed; totalWindowTimer -= (inputWindowSeconds - inputWindowTimer); inputWindowTimer = 0f; onInputWindowChanged.Invoke(inputWindow); LogEvent("InputWindowChange"); GameObject balloonChild = balloon.transform.GetChild(0).gameObject; if (balloonChild.activeSelf) { buzz.Play(0); } // store the input decision. urn.SetEntryResult(System.Enum.GetName(typeof(TrialType), trialResult)); CalculateRecogRate(); // Send Decision Data GameDecisionData gameDecisionData = new GameDecisionData(); gameDecisionData.currentFabAlarm = currentFabAlarm; gameDecisionData.decision = trialResult; gameDecision.Invoke(gameDecisionData); LogEvent("GameDecision"); ////Debug.Log("designedInputOrder: " + designedInputOrder.Count); ////Debug.Log("actualInputOrder: " + actualInputOrder.Count); ////Debug.Log("Decision: " + System.Enum.GetName(typeof(InputTypes), currentInputDecision)); //UpdateDesignedInputOrder(); inputIndex++; }
public void onGameDecision(GameDecisionData decisionData) { if (decisionData.decision == TrialType.AccInput) { ActivateSuccessFeedback(); //Debug.Log("Showing Feedback from Real Input."); } else if (decisionData.decision == TrialType.FabInput) { ActivateSuccessFeedback(); //Debug.Log("Showing Feedback from Fabricated Input."); } else { StartCoroutine("Wrong"); } }
public void onGameDecision(GameDecisionData decisionData) { if (decisionData.decision == InputTypes.AcceptAllInput) { Jump(); Debug.Log("Showing Feedback from Real Input."); } else if (decisionData.decision == InputTypes.FabInput) { Jump(); Debug.Log("Showing Feedback from Fabricated Input."); } else { Debug.Log("No Feedback."); } }
public void OnGameDecision(GameDecisionData decisionData) { if (decisionData.decision == InputTypes.AcceptAllInput) { audioSource.PlayOneShot(correctSound, 0.75f); soundState = SoundState.CorrectSound; } else if (decisionData.decision == InputTypes.FabInput) { audioSource.PlayOneShot(correctSound, 0.75f); soundState = SoundState.CorrectSound; } else { soundState = SoundState.RejectSound; audioSource.PlayOneShot(wrongSound, 1f); soundState = SoundState.None; } }
public void CloseInputWindow() { // update the window state. inputWindowOpen = false; //Debug.Log("Input window closed"); inputWindow = InputWindowState.Closed; inputWindowTimer = 0f; onInputWindowChanged.Invoke(inputWindow); LogEvent("InputWindowChange"); // store the input decision. actualInputOrder.Add(currentInputDecision); CalculateRecogRate(); // Send Decision Data GameDecisionData gameDecisionData = new GameDecisionData(); gameDecisionData.currentRecogRate = actualRecognitionRate; gameDecisionData.currentFabRate = actualRecognitionRate; gameDecisionData.currentFabAlarm = currentFabAlarm; gameDecisionData.decision = currentInputDecision; gameDecision.Invoke(gameDecisionData); LogEvent("GameDecision"); Debug.Log("designedInputOrder: " + designedInputOrder.Count); Debug.Log("actualInputOrder: " + actualInputOrder.Count); Debug.Log("Decision: " + System.Enum.GetName(typeof(InputTypes), currentInputDecision)); UpdateDesignedInputOrder(); int startPolicyReviewTrial = (int)Math.Floor((trials * startPolicyReview)); if (actualInputOrder.Count >= startPolicyReviewTrial) { //ReviewPolicy(); } // update Game Policy GamePolicyData gamePolData = new GamePolicyData(); gamePolData.gamePolicy = gamePolicy; onGamePolicyChanged.Invoke(gamePolData); }