diff --git a/playable/Assets/Scripts/menuContrller.cs b/playable/Assets/Scripts/menuContrller.cs index 84dd040..0d453ac 100644 --- a/playable/Assets/Scripts/menuContrller.cs +++ b/playable/Assets/Scripts/menuContrller.cs @@ -63,6 +63,17 @@ public class menuContrller : MonoBehaviour { } public void panelSelect (string panel){ + + btn_1player.GetComponent ().color = Color.grey; + btn_2player.GetComponent ().color = Color.grey; + btn_3player.GetComponent ().color = Color.grey; + btn_4player.GetComponent ().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); }