added player life display
This commit is contained in:
@@ -28,6 +28,10 @@ public class Entity {
|
||||
String[] dialogue = new String[20];
|
||||
int dialogueIndex = 0;
|
||||
|
||||
// CHARACTER STATUS
|
||||
public int maxLife;
|
||||
public int life;
|
||||
|
||||
public Entity(GamePanel panel) {
|
||||
this.panel = panel;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,10 @@ public class Player extends Entity {
|
||||
worldY = panel.tileSize * 21;
|
||||
speed = 4;
|
||||
direction = Direction.DOWN;
|
||||
|
||||
// PLAYER STATUS (1 heart = 2 lives)
|
||||
maxLife = 6;
|
||||
life = maxLife;
|
||||
}
|
||||
|
||||
public void getPlayerImage() {
|
||||
|
||||
Reference in New Issue
Block a user