add death animation to dying monsters

This commit is contained in:
2025-11-30 00:13:54 +01:00
parent c55bf8d043
commit 9aae9ad20f
3 changed files with 33 additions and 9 deletions

View File

@@ -11,7 +11,6 @@ import java.awt.*;
public class Player extends Entity {
KeyHandler keyH;
public final int screenX;
public final int screenY;
@@ -156,7 +155,7 @@ public class Player extends Entity {
panel.monster[index].life -= 1;
panel.playSE(5);
panel.monster[index].invincible = true;
if(panel.monster[index].life <= 0) panel.monster[index] = null;
if(panel.monster[index].life <= 0) panel.monster[index].dying = true;
}
public void interactNPC(int index) {