public void Interact() { if (_satisfied) { Bark.Play(); Talk.Interact(); //theBark.SetActive(true); //changed from winCanvas } }
private IEnumerator StartCutScene() { //if the sanitation is built, wait for four seconds and trigger "In the meantime..." slide yield return(new WaitForSeconds(1.5f)); MiniGameClose.SetActive(false); if (GameObject.Find("Music") != null) { GameObject.Find("Music").GetComponent <AudioSource>().Pause(); } InTheMeantimeCanvas.SetActive(true); //then trigger the video yield return(new WaitForSeconds(3f)); Systems.Status.Pause(); VideoBackground.SetActive(true); VideoDisplayer.SetActive(true); Video.SetActive(true); Video.GetComponent <VideoPlayer>().Play(); InTheMeantimeCanvas.SetActive(false); yield return(new WaitForSeconds(63f)); //turn off the video Systems.Status.UnPause(); VideoBackground.SetActive(false); VideoDisplayer.SetActive(false); Video.SetActive(false); if (GameObject.Find("Music") != null) { GameObject.Find("Music").GetComponent <AudioSource>().Play(); } MiniGameClose.SetActive(true); //change banner to "Look for Tsu" _canvas.ChangeText("Look for Tsu"); yield return(new WaitForSeconds(3f)); //Tsu's dialogue appears script.Interact(); bark.Play(); //Tsu's dot appears if (GameObject.Find("TsuPointer") != null) { GameObject.Find("TsuPointer").GetComponent <FlatFollow>().appear(); } GameObject.Find("TrePointer").GetComponent <FlatFollow>().appear(); GameObject.Find("MoPointer").GetComponent <FlatFollow>().appear(); //Ahmad starts walking to Tsu scriptAhmad.enabled = true; Ahmad.GetComponent <SphereCollider>().isTrigger = false; _interact = Ahmad.GetComponent <InteractWithObject>(); Destroy(_interact); print("move the maira"); ////Maria starts moving towards Tsu scriptMaria.enabled = true; if (GameObject.Find("MariaAlert").activeInHierarchy) { GameObject.Find("MariaAlert").SetActive(false); } Maria.GetComponent <SphereCollider>().enabled = false; ////Maria.GetComponent<InteractWithMaria>().Kill(); Maria.GetComponent <InteractWithMaria>().enabled = false; ////Bruce starts walking to Tsu scriptBruce.enabled = true; BruceNav.enabled = true; if (GameObject.Find("BruceAlert").activeInHierarchy) { GameObject.Find("BruceAlert").SetActive(false); } BruceCont.GetComponent <SphereCollider>().enabled = false; BruceCont.GetComponent <InteractWithObject>().enabled = false; }