Browse Source

create player setup methode & add hit points value

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

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

@ -30,6 +30,7 @@ public class StartDarkSoulsGame {
JButton StartButton, choice1, choice2, choice3, choice4;
Container con;
TitelScreenHandler tsHandler= new TitelScreenHandler();
int playerHP ; // comit (19) add player hp
public StartDarkSoulsGame() {
gui.Frame.setSize(800, 600);
@ -135,7 +136,13 @@ public class StartDarkSoulsGame {
playerPanel.add(weaponLabelName);
con.add(playerPanel);
PlayerSetup();
}
public void PlayerSetup() {
playerHP = 15;
hpLabelNumber.setText(""+ playerHP);
}
public class TitelScreenHandler implements ActionListener{
public void actionPerformed(ActionEvent event) {
createGameScreen();

Loading…
Cancel
Save