public void StartDialogue(DialogueIntro dialogue) { textBoxMove.SetBool("IsOpen", true); //Displays the whole dialogue box object StartButton.SetActive(false); bossHealth.SetActive(true); sentences.Clear(); foreach (string sentence in dialogue.sentences) { sentences.Enqueue(sentence); } DisplayNextSentence(); }
void Start() { fileName = Path.Combine(Application.streamingAssetsPath, "surveillanceCapture02.png"); photoprise = 0; dialogue = gameObject.GetComponentInParent <DialogueIntro>(); Debug.Log("dialogue = " + dialogue); if (!System.IO.Directory.Exists(absolutePath)) { System.IO.Directory.CreateDirectory(absolutePath); } if (Application.isEditor) { absolutePath = "Assets/StreamingAssets/"; } WebCamDevice[] cam_devices = WebCamTexture.devices; webCamTexture = new WebCamTexture(cam_devices[0].name, 480, 640, 30); rawimage.texture = webCamTexture; if (webCamTexture != null) { webCamTexture.Play(); } }