Exemplo n.º 1
0
    void OpenMenuItemInvokeFuction()
    {
        GameObject MenuToOpenObj = null;

        switch (OptionsOpen)
        {
        case OptionsMenuNavigation.Graphics:
            MenuToOpenObj = GraphicsMenuObj;
            break;

        case OptionsMenuNavigation.Controls:
            MenuToOpenObj = ControllsMenuObj;
            break;

        case OptionsMenuNavigation.Volume:
            MenuToOpenObj = VolumeMenuObj;
            break;
        }
        GraphicsMenuObj.SetActive(false);
        ControllsMenuObj.SetActive(false);
        VolumeMenuObj.SetActive(false);
        MenuToOpenObj.SetActive(true);
        MenuIsOpen = true;
        CloseRegularMenu();
        OptionsOpen = MenuNav;
    }
Exemplo n.º 2
0
 void CloseCurrentlyOpenMenu()
 {
     ReopenRegularMenu();
     GraphicsMenuObj.SetActive(false);
     ControllsMenuObj.SetActive(false);
     VolumeMenuObj.SetActive(false);
     OptionsOpen = OptionsMenuNavigation.None;
     MenuIsOpen  = false;
 }
Exemplo n.º 3
0
    void Start()
    {
        VolumeSliderCurrentlySelected = 0;
        bool LoadAvailable;

        GraphicsMenuResolutionOptions = 0;
        OptionsSaveLoad.LoadSettings();
        switch (OptionsSaveLoad.OptionsSaveExists)
        {
        case true:
            LoadAvailable = true;
            break;

        case false:
            LoadAvailable = false;
            break;

        default:
            LoadAvailable = false;
            break;
        }
        ExistingOptions = LoadAvailable;

        if (!ExistingOptions)
        {
            GameOptions.current = new GameOptions();
        }

        OptionsSaveLoad.SaveSettings();
        Controls = PlayerController.CreateWithDefaultBindings();
        //Selection2 = false;
        //ControlsListOpen = false;
        MenuIsOpen      = false;
        move            = 0;
        buttonPressTime = 0;
        //Debug.Log("Last Device Style: " + Controls.LastDeviceStyle);
        string LastDeviceUsed      = Controls.LastDeviceStyle.ToString();
        string LastCheckDeviceUsed = LastDeviceUsed;

        GraphicsMenuObj.SetActive(false);
        ControllsMenuObj.SetActive(false);
        VolumeMenuObj.SetActive(false);
        ReopenRegularMenu();
        //Debug.Log (InputDeviceStyle.PlayStation4.ToString());
        switch (LastDeviceUsed)
        {
        default:
            DisplayButtonsTypes(0);
            break;

        case "PlayStation4":
            DisplayButtonsTypes(1);
            break;

        case "XboxOne":
            DisplayButtonsTypes(2);
            break;
        }
        //selected = false;
        MenuNav                     = OptionsMenuNavigation.Graphics;
        OptionsOpen                 = OptionsMenuNavigation.None;
        buttonPressTime             = buttonPressReset;
        SelectionTimer              = SelectionBuffer;
        GraphicsMenuSelectionNumber = 0;
        foreach (AudioSource sourceToBeSetDeactiveHere in VolumeTestSources)
        {
            sourceToBeSetDeactiveHere.gameObject.SetActive(false);
        }
    }