From d980ed3840111da1284a368320ae80bcf5c30271 Mon Sep 17 00:00:00 2001 From: Yazan Alaamer <yazan.alaamer@informatik.hs-fulda.de> Date: Fri, 20 Jan 2023 21:27:48 +0100 Subject: [PATCH] create player setup methode & add hit points value --- src/main/java/game/StartDarkSoulsGame.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/game/StartDarkSoulsGame.java b/src/main/java/game/StartDarkSoulsGame.java index feb9cfe..89dd37b 100644 --- a/src/main/java/game/StartDarkSoulsGame.java +++ b/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();