RotatingMenuPanel.deactivatePanel C# (CSharp) Method

deactivatePanel() public method

public deactivatePanel ( ) : void
return void
    public void deactivatePanel()
    {
        for(int i = 0; i < switchButtons.Length; i++)
        {
            switchButtons[i].gameObject.SetActive(false);
        }

        if(mainButton != null)
        {
            mainButton.interactable = false;
        }

        if(screenLabel.Length > 0)
        {
            for(int i = 0; i < screenLabel.Length; i++)
            {
                screenLabel[i].gameObject.SetActive(false);
            }
        }

        displayPanel.color = new Color(displayPanel.color.r, displayPanel.color.g, displayPanel.color.b, 0.1f);
        setPanelObjectStates (false);
    }

Usage Example

 // set up to go to new game menu
 public void toNewGame()
 {
     turning        = true;
     moving         = true;
     targetLocation = newGameWayPoint.position;
     targetRotation = newGameWayPoint.rotation;
     currentMenu.deactivatePanel();
     currentMenu  = newGameMenu;
     currentPanel = Panel.NEWGAME;
 }
All Usage Examples Of RotatingMenuPanel::deactivatePanel