|
@ -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(); |
|
|