From e8a226ead20257338b449d2c1c4758bd5da5448e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 1 Jun 2015 07:23:37 +1000 Subject: [PATCH] Player Select Fix --- playable/Assets/Scripts/menuContrller.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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); }