private void Update() { if (InputMapper.MenuLeft()) { currentButton--; if (currentButton < 0) { currentButton = topPanelButtons.Length - 1; } topPanelButtons[currentButton].onClick.Invoke(); SetActiveButtonColor(); } if (InputMapper.MenuRight()) { currentButton++; if (currentButton >= topPanelButtons.Length) { currentButton = 0; } topPanelButtons[currentButton].onClick.Invoke(); SetActiveButtonColor(); } }