diff --git a/unity_Project/Assets/EndCamera.cs b/unity_Project/Assets/EndCamera.cs index bfb0f37..351886e 100644 --- a/unity_Project/Assets/EndCamera.cs +++ b/unity_Project/Assets/EndCamera.cs @@ -3,8 +3,8 @@ using System.Collections; public class EndCamera : MonoBehaviour { - public GameObject camera; public MonoBehaviour script; + public float waitTime; // Use this for initialization void Start () { @@ -19,6 +19,12 @@ public class EndCamera : MonoBehaviour { void OnTriggerEnter(Collider other) { if (other.transform.tag == "moveable") { script.enabled = false; + StartCoroutine(wait()); } } + + IEnumerator wait() { + yield return new WaitForSeconds(waitTime); + Application.LoadLevel ("TitleScreen"); + } } diff --git a/unity_Project/Assets/_Scenes/CreditScreen.unity b/unity_Project/Assets/_Scenes/CreditScreen.unity index 79fbbe5..f949d49 100644 Binary files a/unity_Project/Assets/_Scenes/CreditScreen.unity and b/unity_Project/Assets/_Scenes/CreditScreen.unity differ diff --git a/unity_Project/ProjectSettings/EditorBuildSettings.asset b/unity_Project/ProjectSettings/EditorBuildSettings.asset index 42116fe..f8c6ec2 100644 Binary files a/unity_Project/ProjectSettings/EditorBuildSettings.asset and b/unity_Project/ProjectSettings/EditorBuildSettings.asset differ