diff --git a/out/production/Legion 501/button_atlas.png b/out/production/Legion 501/button_atlas.png index e1035cb..6fcca49 100644 Binary files a/out/production/Legion 501/button_atlas.png and b/out/production/Legion 501/button_atlas.png differ diff --git a/out/production/Legion 501/menu_background.png b/out/production/Legion 501/menu_background.png deleted file mode 100644 index bdee1c2..0000000 Binary files a/out/production/Legion 501/menu_background.png and /dev/null differ diff --git a/res/button_atlas.png b/res/button_atlas.png index e1035cb..6fcca49 100644 Binary files a/res/button_atlas.png and b/res/button_atlas.png differ diff --git a/res/menu_background.png b/res/menu_background.png deleted file mode 100644 index bdee1c2..0000000 Binary files a/res/menu_background.png and /dev/null differ diff --git a/src/entities/Player.java b/src/entities/Player.java index f1f97af..a74fbfc 100644 --- a/src/entities/Player.java +++ b/src/entities/Player.java @@ -66,6 +66,7 @@ private void updateAnimationTick(){ case IDLE -> { active = true; initHitbox(x, y, (int) (20 * Game.SCALE), (int) (28 * Game.SCALE)); + System.out.println("Hitbox inicializada"); } } } diff --git a/src/gameState/GameState.java b/src/gameState/GameState.java index 162d6db..cabf5bd 100644 --- a/src/gameState/GameState.java +++ b/src/gameState/GameState.java @@ -7,7 +7,7 @@ public enum GameState { - PLAYING, MENU, OPTIONS, QUIT; + PLAYING, MENU, OPTIONS, RANKING, QUIT; public static GameState state = MENU; // Estado por default. diff --git a/src/gameState/Menu.java b/src/gameState/Menu.java index 4a5f94e..8d3255c 100644 --- a/src/gameState/Menu.java +++ b/src/gameState/Menu.java @@ -14,7 +14,7 @@ public class Menu extends State { // ====================> ATRIBUTOS <==================== - private MenuButton[] buttons = new MenuButton[3]; // Lo iniciamos porque ya sabemos la cantidad de botones que utilizamos + private MenuButton[] buttons = new MenuButton[4]; // Lo iniciamos porque ya sabemos la cantidad de botones que utilizamos // ====================> CONSTRUCTOR <==================== public Menu(Game game) { @@ -26,9 +26,10 @@ public Menu(Game game) { // ====================> METODOS <==================== private void loadButtons() { - buttons[0] = new MenuButton(Game.GAME_WIDTH / 2, (int) (150*Game.SCALE),0,GameState.PLAYING); - buttons[1] = new MenuButton(Game.GAME_WIDTH / 2, (int) (230*Game.SCALE),1,GameState.OPTIONS); - buttons[2] = new MenuButton(Game.GAME_WIDTH / 2, (int) (310*Game.SCALE),2,GameState.QUIT); + buttons[0] = new MenuButton(Game.GAME_WIDTH / 2, (int) (150*Game.SCALE),0,GameState.PLAYING); // Primero (y = 150) + buttons[1] = new MenuButton(Game.GAME_WIDTH / 2, (int) (310*Game.SCALE),1,GameState.OPTIONS); // Tercero (y = 310) + buttons[2] = new MenuButton(Game.GAME_WIDTH / 2, (int) (390*Game.SCALE),2,GameState.QUIT); // Cuarto (y = 390) + buttons[3] = new MenuButton(Game.GAME_WIDTH / 2, (int) (230*Game.SCALE),3,GameState.RANKING); // Segundo (y = 230) // La yPos, se debe editar manualmente y le agregamos al final a que state pertene el boton } @@ -98,14 +99,12 @@ public void mouseClicked(MouseEvent e) { } @Override - public void keyPressed(KeyEvent e) { // BORRAR LUEGO - if (e.getKeyCode() == KeyEvent.VK_ENTER) { - GameState.state = GameState.PLAYING; - } + public void keyPressed(KeyEvent e) { + // Sin uso todavia } @Override - public void keyReleased(KeyEvent e) { // BORRAR LUEGO + public void keyReleased(KeyEvent e) { // Sin uso (todavia) } } diff --git a/src/main/Game.java b/src/main/Game.java index 37d3851..54e7cea 100644 --- a/src/main/Game.java +++ b/src/main/Game.java @@ -84,6 +84,7 @@ public void update(){ playing.update(); break; case OPTIONS: //option.update() [no existe aun] break; + case RANKING: //ranking.update() [no existe aun] break; case QUIT: default: System.exit(0); // Cierra el programa