You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

40 lines
853 B

using UnityEngine;
using System.Collections;
public class sceneController : MonoBehaviour {
public GameObject player1;
public GameObject player2;
public GameObject player3;
public GameObject player4;
public levelController control;
private int playerCount;
// Use this for initialization
void Start () {
control = GameObject.FindGameObjectWithTag ("GameController").GetComponent<levelController> ();
player1.SetActive (false);
player2.SetActive (false);
player3.SetActive (false);
player4.SetActive (false);
playerCount = control.playerCount;
if (playerCount >= 1)
player1.SetActive (true);
if (playerCount >= 2)
player2.SetActive (true);
if (playerCount >= 3)
player3.SetActive (true);
if (playerCount >= 4)
player4.SetActive (true);
}
// Update is called once per frame
void Update () {
}
}