Exemplo n.º 1
0
 /// <summary>
 /// Pop up error-panel if user enters WASD for robot controls
 /// </summary>
 public void ShowBindedInfoPanel()
 {
     if (KeyButton.Binded())
     {
         bindedKeyPanel.SetActive(true);
     }
     else
     {
         bindedKeyPanel.SetActive(false);
         ToggleHotKeys(false);
     }
 }
Exemplo n.º 2
0
        private void Update()
        {
            if (toolkit == null)
            {
                camera = GameObject.Find("Main Camera").GetComponent <DynamicCamera>();

                toolkit          = GetComponent <Toolkit>();
                multiplayer      = GetComponent <LocalMultiplayer>();
                sensorManagerGUI = GetComponent <SensorManagerGUI>();

                FindElements();
            }
            else if (camera == null)
            {
                camera = GameObject.Find("Main Camera").GetComponent <DynamicCamera>();
            }
            else
            {
                UpdateWindows();

                if (UnityEngine.Input.GetKeyDown(KeyCode.Escape) && !InputControl.freeze)
                {
                    if (!exitPanel.activeSelf)
                    {
                        if (GameObject.Find("Dropdown List"))
                        {
                            GameObject.Destroy(GameObject.Find("Dropdown List"));
                        }
                        MainMenuExit("open");
                    }
                    else
                    {
                        MainMenuExit("cancel");
                    }
                }

                if (KeyButton.Binded() && inputPanelOn)
                {
                    ShowBindedInfoPanel();
                }
            }
            HighlightTabs();
            if (State.isEmulationDownloaded)
            {
                emulationTab.SetActive(true);
            }
        }