|
|
@ -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"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|