public override void Init(MainLogic mainLogic) { agentsController = mainLogic.GetAgentsController(); agentsController.ActivateNextAgent(); mainLogic.StopSpeechRecognition(); Camera.main.gameObject.transform.position = new Vector3(0.074f, 2.13f, -1.973f); Camera.main.fieldOfView = 11; faceTestProps.SetActive(true); }
public override void Init(MainLogic mainLogic) { this.mainLogic = mainLogic; agentsController = mainLogic.GetAgentsController(); agentsController.ActivateNextAgent(); props.SetActive(true); //camQuaternionOriginal = Camera.main.gameObject.transform.rotation; //Camera.main.gameObject.transform.LookAt(GameObject.Find("mixamorig:Head").transform); //Camera.main.fieldOfView = 11; }
public override void Init(MainLogic mainLogic) { currentlyOrdering = CurrentlyOrdering.BURGER; fastfoodProps.SetActive(true); this.mainLogic = mainLogic; agentsController = mainLogic.GetAgentsController(); agentsController.ActivateNextAgent(); mainLogic.StartSpeechRecognition(); }
void Update() { HandleShortcuts(); if (t_CallAfterChatbotFinishesOnBack) { t_CallAfterChatbotFinishesOnBack = false; AfterChatbotFinishes(t_AgentResponseOnBack); } // exposure change block if (exposureChangeFlag) { if (exposureUpOrDown) { exposure -= Time.deltaTime * exposureChangeSpeed; } else { exposure += Time.deltaTime * exposureChangeSpeed; } if (exposure >= 1) { exposure = 1f; exposureUpOrDown = true; if (isChangeAgent) { agentsController.ActivateNextAgent(); } if (startRecognitionAfterChange) { currentScenario.ResetState(); currentScenario.Init(this); startRecognitionAfterChange = false; } } else if (exposure < 0f) { exposure = 0; exposureChangeFlag = false; } scam.ChangeFade(exposure); } /*if(Input.GetKeyDown(KeyCode.F1)) * { * cam.transform.position = new Vector3(-0.12f, 1.89f, -2f); * cam.fieldOfView = 15; * cam.transform.LookAt(agentsController.GetCurrentAgentHeadPosition()); * }*/ if (Input.GetKeyDown(KeyCode.Space) || OVRInput.GetDown(OVRInput.Button.PrimaryTouchpad)) { tmpString = watsonRecognizer.GetRecognizedText(); if (tmpString != null && tmpString.Length != 0) { AfterSpeechRecognition(tmpString); } } else if (Input.GetKeyDown(KeyCode.Backspace)) { watsonRecognizer.ClearRecognizedText(); } else if (Input.GetKeyDown(KeyCode.Return)) { print(inputField.text); AfterSpeechRecognition(inputField.text); inputField.text = ""; } if (Input.GetKeyDown(KeyCode.Escape)) { mainMenuPanel.SetActive(true); // additional pausing is to do } }