From 67559709bd45a0f75bef61fe50de939d863bc263 Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Fri, 16 Oct 2015 18:55:02 +1100 Subject: [PATCH] getting both players to objective triggers credits --- unity_Project/Assets/Scripts/respawners.cs | 10 +++++++--- unity_Project/Assets/_Scenes/MainLevel.unity | Bin 599568 -> 599600 bytes 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/unity_Project/Assets/Scripts/respawners.cs b/unity_Project/Assets/Scripts/respawners.cs index 3237f20..6f92e63 100644 --- a/unity_Project/Assets/Scripts/respawners.cs +++ b/unity_Project/Assets/Scripts/respawners.cs @@ -9,6 +9,8 @@ public class respawners : MonoBehaviour { public GameObject respawnPoint; public GameObject deathTrigger; + public bool objective = false; + private checkpoint deathScript; // Use this for initialization @@ -28,13 +30,15 @@ public class respawners : MonoBehaviour { player2 = true; if (player1 && player2) { + + if (objective) { + Application.LoadLevel("CreditScreen"); + } + deathTrigger.SetActive(true); deathScript.respawnPoint = respawnPoint; gameObject.SetActive(false); - if (this.transform.tag == "end") { - Application.LoadLevel("CreditScene"); - } } diff --git a/unity_Project/Assets/_Scenes/MainLevel.unity b/unity_Project/Assets/_Scenes/MainLevel.unity index b7f6fab2e281e3665194f4051f0ce8d6523fc777..9b2764f4d877c00b21631f939c04de6f4505e9fc 100644 GIT binary patch delta 209 zcmbPmMrFep6#)juuICJ#Y6c7p4Ezj?-3%KAK9~u%#?SX%64YsO=YRCP{^PHf$!|`y zn$9$Ng{6ZaBLgGD0%nGW5TFJ|AeNgftKc|!l?v}f9yH0i+flV%7vwOJ5foFeYr5lws881k#?Wj7w9uf9hhqv}yWO z3pVMA4xH0p*fL3Qb6wx;_^@h?!}Y~$+PUqRfS4JGS%8=oh}nRceLJ@u2kQ#}=RZbO delta 185 zcmdmRMrFbo6#)juuEPwRY61)l4E#X$gN*_o%tS4xcuhNEQrW}*gRx`Uhp=`zplrzI zMiXbINg^DR6D&I>PY}_YT)@pU*~&_4bDY(I^vw#3G(;I=HhXSQW(HDgcZqWVsiTLO zHG$O0*Tn{mG23lr81*@UbgnAn($t9#EZc>;882;`eqaML-}DLn%wp3y?3g5``7%kg aTi7uHF*6Xe05K~NvjH*tb_+X>AI|~f*FH%A