added important note to hit checker

This commit is contained in:
2025-11-28 23:24:35 +01:00
parent 6a6bfd971f
commit f212e5e4a8
2 changed files with 3 additions and 1 deletions

View File

@@ -9,7 +9,6 @@ import de.miaurizius.jgame2d.tile.TileManager;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;

View File

@@ -47,6 +47,9 @@ public class EventHandler {
if(hit(23,12, null)) healingPool(GameState.DIALOGUE); if(hit(23,12, null)) healingPool(GameState.DIALOGUE);
} }
/**
* @param reqDirection Set to null if no direction is required
*/
public boolean hit(int eventCol, int eventRow, Direction reqDirection) { public boolean hit(int eventCol, int eventRow, Direction reqDirection) {
boolean hit = false; boolean hit = false;
panel.player.solidArea.x = panel.player.worldX + panel.player.solidArea.x; panel.player.solidArea.x = panel.player.worldX + panel.player.solidArea.x;