public void Update() { if (menuPanel.activeSelf) { InputControl.DisableSimControls(); } if (lastActive && !menuPanel.activeSelf) { InputControl.EnableSimControls(); } lastActive = menuPanel.activeSelf; }
public void ToggleMaMPanel() { if (mixAndMatchPanel.activeSelf) { mixAndMatchPanel.SetActive(false); InputControl.EnableSimControls(); } else { simUI.EndOtherProcesses(); mixAndMatchPanel.SetActive(true); InputControl.DisableSimControls(); } }
public void ToggleChangeRobotPanel() { if (changeRobotPanel.activeSelf) { changeRobotPanel.SetActive(false); InputControl.EnableSimControls(); } else { EndOtherProcesses(); changeRobotPanel.SetActive(true); robotListPanel.SetActive(true); InputControl.DisableSimControls(); Auxiliary.FindObject(changeRobotPanel, "PathLabel").GetComponent <Text>().text = PlayerPrefs.GetString("RobotDirectory"); } }
/// <summary> /// These toggle, change, and add functions are tethered in Unity /// </summary> public void ToggleChangeFieldPanel() { if (changeFieldPanel.activeSelf) { changeFieldPanel.SetActive(false); InputControl.EnableSimControls(); } else { EndOtherProcesses(); changeFieldPanel.SetActive(true); if (GameObject.Find("Field").transform.childCount > 1) { loadEmptyFieldButton.SetActive(true); } else { loadEmptyFieldButton.SetActive(false); } InputControl.DisableSimControls(); Auxiliary.FindObject(changeFieldPanel, "PathLabel").GetComponent <Text>().text = PlayerPrefs.GetString("FieldDirectory"); } }