removed unnecessary parameters
This commit is contained in:
@@ -43,8 +43,8 @@ public class EventHandler {
|
||||
if(distance > panel.tileSize) canTouchEvent = true;
|
||||
if(!canTouchEvent) return;
|
||||
|
||||
if(hit(27,16, Direction.RIGHT)) damagePit(27, 16, GameState.DIALOGUE);
|
||||
if(hit(23,12, null)) healingPool(23, 12, GameState.DIALOGUE);
|
||||
if(hit(27,16, Direction.RIGHT)) damagePit(GameState.DIALOGUE);
|
||||
if(hit(23,12, null)) healingPool(GameState.DIALOGUE);
|
||||
}
|
||||
|
||||
public boolean hit(int eventCol, int eventRow, Direction reqDirection) {
|
||||
@@ -69,14 +69,14 @@ public class EventHandler {
|
||||
return hit;
|
||||
}
|
||||
|
||||
public void damagePit(int col, int row, GameState gameState) {
|
||||
public void damagePit(GameState gameState) {
|
||||
panel.gameState = gameState;
|
||||
panel.ui.currentDialogue = "You have fallen into a pit!";
|
||||
panel.player.life -= 1;
|
||||
canTouchEvent = false;
|
||||
}
|
||||
|
||||
public void healingPool(int col, int row, GameState gameState) {
|
||||
public void healingPool(GameState gameState) {
|
||||
if(!panel.keyH.spacePressed) return;
|
||||
panel.gameState = gameState;
|
||||
panel.ui.currentDialogue = "You drank the holy water.\nYour life has been recovered!";
|
||||
|
||||
Reference in New Issue
Block a user