slime runs away when it gets hit

This commit is contained in:
2025-11-30 00:49:04 +01:00
parent 2ed21add1c
commit 43212a033b
3 changed files with 7 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ import java.util.logging.Level;
public class Entity {
GamePanel panel;
protected GamePanel panel;
public BufferedImage up1, up2, down1, down2, left1, left2, right1, right2;
public BufferedImage attackUp1, attackUp2, attackDown1, attackDown2, attackLeft1, attackLeft2, attackRight1, attackRight2;
public BufferedImage image, image2, image3;
@@ -142,6 +142,7 @@ public class Entity {
// INTERACTION
public void setAction() {}
public void damageReaction() {};
public void speak() {
if(dialogue[dialogueIndex] == null) dialogueIndex = 0;
panel.ui.currentDialogue = dialogue[dialogueIndex];