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 b7f6fab..9b2764f 100644 Binary files a/unity_Project/Assets/_Scenes/MainLevel.unity and b/unity_Project/Assets/_Scenes/MainLevel.unity differ