//Jimmy Vegas Unity Tutorial //This script is for the cutscene using System.Collections; using System.Collections.Generic; using UnityEngine; public class Cutscene01 : MonoBehaviour { public GameObject thePlayer; public GameObject cutCam; public GameObject cutBars; public GameObject theCursor; public GameObject miniMap; public GameObject fadeIn; public GameObject fadeOut; void OnTriggerEnter(Collider other) { this.GetComponent().enabled = false; fadeOut.SetActive(true); StartCoroutine(SkeletonCut()); } IEnumerator SkeletonCut() { yield return new WaitForSeconds(2); fadeOut.SetActive(false); cutCam.SetActive(true); cutBars.SetActive(true); thePlayer.SetActive(false); theCursor.SetActive(false); miniMap.SetActive(false); fadeIn.GetComponent().Play("FadeScreenIn"); yield return new WaitForSeconds(6); fadeOut.SetActive(true); fadeOut.GetComponent().Play("FadeScreenOut"); yield return new WaitForSeconds(2); thePlayer.SetActive(true); cutCam.SetActive(false); cutBars.SetActive(false); theCursor.SetActive(true); miniMap.SetActive(true); fadeOut.SetActive(false); } }