|
@ -9,6 +9,8 @@ public class respawners : MonoBehaviour { |
|
|
public GameObject respawnPoint; |
|
|
public GameObject respawnPoint; |
|
|
public GameObject deathTrigger; |
|
|
public GameObject deathTrigger; |
|
|
|
|
|
|
|
|
|
|
|
public bool objective = false; |
|
|
|
|
|
|
|
|
private checkpoint deathScript; |
|
|
private checkpoint deathScript; |
|
|
|
|
|
|
|
|
// Use this for initialization
|
|
|
// Use this for initialization
|
|
@ -28,13 +30,15 @@ public class respawners : MonoBehaviour { |
|
|
player2 = true; |
|
|
player2 = true; |
|
|
|
|
|
|
|
|
if (player1 && player2) { |
|
|
if (player1 && player2) { |
|
|
|
|
|
|
|
|
|
|
|
if (objective) { |
|
|
|
|
|
Application.LoadLevel("CreditScreen"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
deathTrigger.SetActive(true); |
|
|
deathTrigger.SetActive(true); |
|
|
deathScript.respawnPoint = respawnPoint; |
|
|
deathScript.respawnPoint = respawnPoint; |
|
|
gameObject.SetActive(false); |
|
|
gameObject.SetActive(false); |
|
|
|
|
|
|
|
|
if (this.transform.tag == "end") { |
|
|
|
|
|
Application.LoadLevel("CreditScene"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|