private void updateButtonsState(Button[] buttons) { foreach (Button button in buttons) button.updateState(); }
// Los pinta abajo centrados en linea private static void initializeScoreButtons(Button[] buttons) { int x = WINDOW_WIDTH / 2 - GameButtonList.getScoreNumber() / 2 * GameButtonList.BUTTON_WIDTH - (GameButtonList.getScoreNumber() % 2) * GameButtonList.BUTTON_WIDTH / 2; int y = WINDOW_HEIGHT / 2 - GameButtonList.BUTTON_HEIGHT / 2; foreach (GameButtonList.scoreButton b in Enum.GetValues(typeof(GameButtonList.scoreButton))) { buttons[(int)b] = new Button(b.ToString(), x, y, GameButtonList.BUTTON_WIDTH, GameButtonList.BUTTON_HEIGHT); x += GameButtonList.BUTTON_WIDTH; } }