示例#1
0
 public void Update()
 {
     if (menuPanel.activeSelf)
     {
         InputControl.DisableSimControls();
     }
     if (lastActive && !menuPanel.activeSelf)
     {
         InputControl.EnableSimControls();
     }
     lastActive = menuPanel.activeSelf;
 }
示例#2
0
 public void ToggleMaMPanel()
 {
     if (mixAndMatchPanel.activeSelf)
     {
         mixAndMatchPanel.SetActive(false);
         InputControl.EnableSimControls();
     }
     else
     {
         simUI.EndOtherProcesses();
         mixAndMatchPanel.SetActive(true);
         InputControl.DisableSimControls();
     }
 }
示例#3
0
 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");
     }
 }
示例#4
0
 /// <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");
     }
 }