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