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(); }
private void Awake() { _menuButtonsHandler = GetComponent <MenuButtonHandler>(); }