void Start()
    {
        if (safeZone == null)
        {
            Debug.LogWarning("Arm operation requires the safe-zone to be specified");
            _touchActive = false;
        }

        // Hide all but the default menu
        // active any disabled menus (disabled for practical reasons in-editor)
        if (defaultMenu != null)
        {
            var menus = GetComponentsInChildren <PhysicsMenu>(true);
            foreach (var menu in menus)
            {
                menu.gameObject.SetActive(true);
                menu.Hide();
            }

            defaultMenu.Show();
            _currentMenu = defaultMenu;
        }

        // Initialize hand choice to set value
        HandChoice = _handChoice;
    }
Esempio n. 2
0
    public IEnumerator WaitAndSwitch(float time, PhysicsMenu menu)
    {
        yield return(new WaitForSeconds(0.25f));

        Hide();
        yield return(new WaitForSeconds(time));

        GetComponentInParent <PhysicsInputManager>().CurrentMenu = menu;
        menu.Show();
    }