Code is in Java. The project is a small scale single player role playing game for PC.
How to handle Dialogue Text for NPC and Quest? Are dialogue for NPC and Quest handled differently?
At the moment, this is how it is currently handled. Text is passed through as a parameter during the creation of NPC and Soldier object.
For map screen 0 of the game (0 being the first map of the game)
public Screen0(double x, double y) {
super(x, y);
// TODO Auto-generated constructor stub
anim = new Animation(animations);
String text = "My cat is in danger! Please I need your help!";
soldier = new NPC(new Soldier(getWidth() - (getWidth() * .66) , (getHeight() - (getHeight() * 1.2)) ),text);
}
Screen 1(1 is the second map of the game)
public Screen1(double x, double y) {
super(x, y);
// TODO Auto-generated constructor stub
anim = new Animation(animations);
String text = "I'm in need of limber. ";
soldier = new NPC(new Soldier(getWidth() - (getWidth() * 1.5) , (getHeight() - (getHeight() * 1.2)) ), text);
}