From 0b8a556b660ab6c52b873fddc2fbb36202961789 Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Fri, 16 Oct 2015 16:55:12 +1100 Subject: [PATCH] credits now return to menu --- unity_Project/Assets/EndCamera.cs | 8 +++++++- .../Assets/_Scenes/CreditScreen.unity | Bin 135200 -> 135128 bytes .../ProjectSettings/EditorBuildSettings.asset | Bin 4228 -> 4228 bytes 3 files changed, 7 insertions(+), 1 deletion(-) 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 79fbbe51b7e7b4acbeeb2f7accdd087a138aa402..f949d49b7ec4830b367adb123ac2acdeca9e16bb 100644 GIT binary patch delta 496 zcmZY4PbhU^ zVBw%8xi~p2BIK}~+_Zy()b?)T_59xVq8z^8_kDXlzo*|Di3o{(K?L|og03(D0EGYw zY>2fb&uyEh&8FMVb@S!1Gy3YRpy6<=sccBcY#1yb!5w1_c6Q{TS6?d3xqUMZ-=rrN z)GvOT9Yj-#q69#oH-PrmLqC6tSd^BS3+t)lIGC0!^D@9VO$=%jg)7@~RMoGzLaq__ zs6%*3TFe5pkf>6l>8IYlX?|(|Kgij!K$i5f0$3-TEiPbiO|!q-izg0dxvxRDEU_>K zsYTqCB}>S_U`+>*)bnWDd#vY+T#NWfE`smW0_J8UOITq4?(%(8y~K4KyEFVh$Ef4D zK-!+iz)q8p8f`bb)pP{U$R+SjJ(DDTl+Pec@# z6z^wJbp$fQfS3n}rGc1%gMopOfr;TB14DxtkjnzZGLvJa#93v5EXK)-(za~LiMgpo ziIXLmWjEU~SACX@0m^*)|NnmxNHY*vnk~r((Grs{ev@X*nEVz7D!H*TnSVy@r!}M1gJt0j3KHoxwsX8bOlV_ z2vip_`RsRTW{|sHf0vZa0J{7LP!8F2;he>#AoT{56@N%G&X{ZqBqb(C{*acPz{1GT z!o zAbDZ3ivJPlF3Vsar+-Gj-!U_C2=syA>mGE4xfyamP()iUDG zYk^z_hsh6t>Q+qt3nXuBmi(3fo68*-{QgN