Browse Source

Player Select Fix

master
unknown 9 years ago
parent
commit
e8a226ead2
1 changed files with 15 additions and 2 deletions
  1. +15
    -2
      playable/Assets/Scripts/menuContrller.cs

+ 15
- 2
playable/Assets/Scripts/menuContrller.cs View File

@ -63,6 +63,17 @@ public class menuContrller : MonoBehaviour {
}
public void panelSelect (string panel){
btn_1player.GetComponent<Image> ().color = Color.grey;
btn_2player.GetComponent<Image> ().color = Color.grey;
btn_3player.GetComponent<Image> ().color = Color.grey;
btn_4player.GetComponent<Image> ().color = Color.grey;
p1Enabled = false;
p2Enabled = false;
p3Enabled = false;
p4Enabled = false;
menu.SetActive (false);
options.SetActive (false);
levelSelect.SetActive (false);
@ -75,6 +86,7 @@ public class menuContrller : MonoBehaviour {
if (panel == "menu")
menu.SetActive (true);
if (panel =="options")
options.SetActive (true);
if (panel == "levelSelect") {
@ -129,8 +141,9 @@ public class menuContrller : MonoBehaviour {
control.p2Enabled = p2Enabled;
control.p3Enabled = p3Enabled;
control.p4Enabled = p4Enabled;
Application.LoadLevel (level);
if (p1Enabled || p2Enabled || p3Enabled || p4Enabled)
Application.LoadLevel (level);
}

Loading…
Cancel
Save