Exemple #1
0
    private void Awake()
    {
        menuButtonHandler = GetComponentInParent <MenuButtonHandler>();
        playerControls    = new PlayerControls();

        selectAction            = playerControls.Menu.Select;
        selectAction.performed += context => isSelecting = true;
        selectAction.canceled  += contex => isSelecting = false;
    }
    // Use this for initialization
    void Start()
    {
        buttonHandler  = GetComponent <MenuButtonHandler>();
        canvas         = GetComponent <Canvas>();
        canvas.enabled = false;

        if (amountOfVertButtons > 0)
        {
            detailMenu = Instantiate(new GameObject("DetailMenu"));
            detailMenu.transform.parent = transform;
            CloseDetailMenu();
        }

        CreateButtons();
        InitializeButtons();
    }
Exemple #3
0
 private void Awake()
 {
     _menuButtonsHandler = GetComponent <MenuButtonHandler>();
 }