finished dialogue system
This commit is contained in:
@@ -95,12 +95,19 @@ public class Player extends Entity {
|
||||
|
||||
public void interactNPC(int index) {
|
||||
if(index == 999) return;
|
||||
//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) {
|
||||
graphics2d.drawImage(parseSprite(), screenX, screenY, null);
|
||||
}
|
||||
|
||||
public void speak() {
|
||||
//This method only exists for character specific things later...
|
||||
super.speak();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user