Browse Source

getting both players to objective triggers credits

master
Joshua Reason 8 years ago
parent
commit
67559709bd
2 changed files with 7 additions and 3 deletions
  1. +7
    -3
      unity_Project/Assets/Scripts/respawners.cs
  2. BIN
      unity_Project/Assets/_Scenes/MainLevel.unity

+ 7
- 3
unity_Project/Assets/Scripts/respawners.cs View File

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

BIN
unity_Project/Assets/_Scenes/MainLevel.unity View File


Loading…
Cancel
Save