added some sample events
This commit is contained in:
@@ -75,6 +75,11 @@ public class Player extends Entity {
|
||||
int npcIndex = panel.collisionH.checkEntity(this, panel.npc);
|
||||
interactNPC(npcIndex);
|
||||
|
||||
// CHECK EVENT
|
||||
panel.eventH.checkEvent();
|
||||
|
||||
panel.keyH.spacePressed = false;
|
||||
|
||||
if(!collisionOn) {
|
||||
switch (direction) {
|
||||
case UP -> worldY -= speed;
|
||||
@@ -103,7 +108,6 @@ public class Player extends Entity {
|
||||
//if(!panel.keyH.spacePressed) return; //Only uncomment if text should only appear if player hits space
|
||||
panel.gameState = GameState.DIALOGUE;
|
||||
panel.npc[index].speak();
|
||||
panel.keyH.spacePressed = false;
|
||||
}
|
||||
|
||||
public void draw(Graphics2D graphics2d) {
|
||||
|
||||
Reference in New Issue
Block a user