From 467806e1d8f92548096ba960d02c00b3fe3e167b Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sun, 3 Jun 2012 20:18:15 -0400 Subject: Added health counter --- src/com/fourisland/frigidearth/MapViewGameState.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/com/fourisland/frigidearth/MapViewGameState.java b/src/com/fourisland/frigidearth/MapViewGameState.java index dd20eac..0371c6a 100644 --- a/src/com/fourisland/frigidearth/MapViewGameState.java +++ b/src/com/fourisland/frigidearth/MapViewGameState.java @@ -43,6 +43,7 @@ public class MapViewGameState implements GameState private int playery = 4; private int viewportx = 0; private int viewporty = 0; + private int health = 15; public MapViewGameState() { @@ -550,6 +551,15 @@ public class MapViewGameState implements GameState } } } + + // Render status bar + g.drawImage(SystemFont.getCharacter((char) 3, Color.RED), TILE_WIDTH, 0, TILE_WIDTH, TILE_HEIGHT, null); + String healthText = Integer.toString(health); + + for (int i=0; i