Browse Source

set guard answers

master
Yazan Alaamer 2 years ago
parent
commit
f01d481678
  1. 11
      src/main/java/game/StartDarkSoulsGame.java

11
src/main/java/game/StartDarkSoulsGame.java

@ -31,6 +31,7 @@ public class StartDarkSoulsGame {
Container con; Container con;
TitelScreenHandler tsHandler= new TitelScreenHandler(); TitelScreenHandler tsHandler= new TitelScreenHandler();
int playerHP ; int playerHP ;
String position;
String weapon; String weapon;
public StartDarkSoulsGame() { public StartDarkSoulsGame() {
@ -152,13 +153,21 @@ public class StartDarkSoulsGame {
townGate(); townGate();
} }
public void townGate() { public void townGate() {
position = "twonGate";
mainTextArea.setText("You are at the Gate of the town.\n A guard is standing in front of you. WHAT DO YOU DO !?"); mainTextArea.setText("You are at the Gate of the town.\n A guard is standing in front of you. WHAT DO YOU DO !?");
choice1.setText("Talk to the gurad "); choice1.setText("Talk to the gurad ");
choice2.setText("Attack the guard"); choice2.setText("Attack the guard");
choice3.setText("Leave"); choice3.setText("Leave");
choice4.setText(""); choice4.setText("");
} }
public void talkGuard() {
position="talkGuard";
mainTextArea.setText("Guard: Hallo stranger. i have never seen your face. I'm sorry but we can not let a stranger enter our town");
choice1.setText(">");
choice2.setText("");
choice3.setText("");
choice4.setText("");
}
public class TitelScreenHandler implements ActionListener{ public class TitelScreenHandler implements ActionListener{
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
createGameScreen(); createGameScreen();

Loading…
Cancel
Save