//Jimmy Vegas Unity Tutorial //This script is for the level complete using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityStandardAssets.Characters.FirstPerson; public class FloorComplete : MonoBehaviour { public GameObject fadeOut; public GameObject completePanel; public GameObject thePlayer; void OnTriggerEnter(Collider other) { StartCoroutine(CompletedFloor()); thePlayer.GetComponent().enabled = false; this.gameObject.GetComponent().enabled = false; } IEnumerator CompletedFloor() { fadeOut.SetActive(true); yield return new WaitForSeconds(2); completePanel.SetActive(true); } }