Browse Source

add & display weapon name to player setup

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

7
src/main/java/game/StartDarkSoulsGame.java

@ -30,7 +30,8 @@ public class StartDarkSoulsGame {
JButton StartButton, choice1, choice2, choice3, choice4; JButton StartButton, choice1, choice2, choice3, choice4;
Container con; Container con;
TitelScreenHandler tsHandler= new TitelScreenHandler(); TitelScreenHandler tsHandler= new TitelScreenHandler();
int playerHP ; // comit (19) add player hp
int playerHP ;
String weapon;
public StartDarkSoulsGame() { public StartDarkSoulsGame() {
gui.Frame.setSize(800, 600); gui.Frame.setSize(800, 600);
@ -140,7 +141,9 @@ public class StartDarkSoulsGame {
} }
public void PlayerSetup() { public void PlayerSetup() {
playerHP = 15; playerHP = 15;
hpLabelNumber.setText(""+ playerHP);
hpLabelNumber.setText(""+ playerHP);
weapon = "Knife";
weaponLabelName.setText(weapon);
} }
public class TitelScreenHandler implements ActionListener{ public class TitelScreenHandler implements ActionListener{

Loading…
Cancel
Save