refactored reset game

This commit is contained in:
2025-12-16 13:57:52 +01:00
parent ce3f590715
commit 54a2ee3022
5 changed files with 20 additions and 10 deletions

View File

@@ -311,9 +311,14 @@ public class Player extends Entity {
worldY = panel.tileSize * 21;
direction = Direction.DOWN;
}
public void restoreLife() {
public void restoreStatus() {
life = maxLife;
invincible = false;
transparent = false;
attacking = false;
guarding = false;
knockback = false;
lightUpdated = true;
}
public void getSleepingImage(BufferedImage image) {
down1 = image;
@@ -346,6 +351,7 @@ public class Player extends Entity {
coins = 500;
currentWeapon = new SwordNormalObj(panel);
currentShield = new ShieldWoodObj(panel);
currentLight = null;
projectile = new FireballObj(panel);
attack = getAttack();
defense = getDefense();